[bisq-network/bisq] [WIP] Add segwit support to the BTC wallet (#4568)

chimp1984 notifications at github.com
Thu Oct 8 20:16:04 UTC 2020


@chimp1984 commented on this pull request.

utACK

See small suggestion in comment...

> @@ -293,25 +301,34 @@ protected void startUp() throws Exception {
             vPeerGroup.addWallet(vBsqWallet);
             onSetupCompleted();
 
-            Futures.addCallback((ListenableFuture<?>) vPeerGroup.startAsync(), new FutureCallback<Object>() {
-                @Override
-                public void onSuccess(@Nullable Object result) {
-                    //completeExtensionInitiations(vPeerGroup);
-                    DownloadProgressTracker tracker = downloadListener == null ? new DownloadProgressTracker() : downloadListener;
-                    vPeerGroup.startBlockChainDownload(tracker);
-                }
-
-                @Override
-                public void onFailure(Throwable t) {
-                    throw new RuntimeException(t);
+            if (migratedWalletToSegwit.get()) {
+                startPeerGroup();
+            } else {
+                migratedWalletToSegwit.addListener((observable, oldValue, newValue) -> startPeerGroup());

I think we should add a `if(newValue)` to make it more clear/safe. As we change only once from false to true it would not matter but feels more correct.

-- 
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/4568#pullrequestreview-505129344
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201008/0d665876/attachment.html>


More information about the bisq-github mailing list