[bisq-network/bisq] Fix bug with seed restore and open offers (#4507)

chimp1984 notifications at github.com
Wed Sep 9 19:19:15 UTC 2020


Fixes #4499

When restoring from same seeds and the user had open offers the reserved balance was not updated as the addressEntry list got created newly. It is not the normal use case that a user applies the same seed to a data directory containing open offers but we should handle such cases correctly as well.

We also check now for open offers and enforce that those get removed at restore from seeds.

There have been potential bugs as well in the addressEntryList class which are hopefully eliminated by that PR. Some might have been responsible for out-of-sync addressList with wallet data issues. Those cases are hard to reproduce and mostly happen at rather un-usual situations. 

Lots of refactoring as well...

I tested quite a bit but it will require good testing before deployment.
You can view, comment on, or merge this pull request online at:

  https://github.com/bisq-network/bisq/pull/4507

-- Commit Summary --

  * Use a hash set instead of a list to avoid duplicates
  * - Change entrySet to CopyOnWriteArraySet to avoid potential ConcurrentModificationExceptions
  * Refactoring
  * Instead of renaming the AddressEntryList to a backup file we keep it
  * Improve toString method
  * Remove unused method
  * Fix bug with wallet restore with same seed and when there was
  * Add check for open offers and remove them if present at restore from seed

-- File Changes --

    M common/src/main/java/bisq/common/storage/FileUtil.java (21)
    M core/src/main/java/bisq/core/btc/model/AddressEntry.java (11)
    M core/src/main/java/bisq/core/btc/model/AddressEntryList.java (176)
    M core/src/main/java/bisq/core/btc/setup/WalletsSetup.java (3)
    M core/src/main/java/bisq/core/btc/wallet/BtcWalletService.java (59)
    M core/src/main/resources/i18n/displayStrings.properties (2)
    A desktop/src/main/java/bisq/desktop/main/SharedPresentation.java (87)
    M desktop/src/main/java/bisq/desktop/main/account/content/seedwords/SeedWordsView.java (24)
    M desktop/src/main/java/bisq/desktop/main/overlays/windows/WalletPasswordWindow.java (9)
    M desktop/src/main/java/bisq/desktop/util/GUIUtil.java (23)

-- Patch Links --

https://github.com/bisq-network/bisq/pull/4507.patch
https://github.com/bisq-network/bisq/pull/4507.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200909/b58d05f2/attachment.html>


More information about the bisq-github mailing list