[bisq-network/bisq] Wallet changes for Segwit BSQ implementation (#5109)

Steven Barclay notifications at github.com
Sat Jan 30 02:22:28 CET 2021


@stejbac commented on this pull request.



>          return getUnusedAddress();
     }
 
-    public LegacyAddress getUnusedAddress() {
-        return (LegacyAddress) wallet.getIssuedReceiveAddresses().stream()
+    public Address getUnusedAddress() {
+        return wallet.getIssuedReceiveAddresses().stream()
+                .filter(address -> Script.ScriptType.P2WPKH.equals(address.getOutputScriptType()))

Yes, that was my intention. The default active keychain (that is, the segwit one) comes last in the list of keychains queried by bitcoinj for issued addresses, so any unused legacy addresses would show up first in the filtered list. That was also what I observed on regtest, if I recall correctly.

-- 
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/5109#discussion_r567173950
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210129/d85c3e74/attachment.htm>


More information about the bisq-github mailing list