[bisq-network/bisq] Allow spending of unconfirmed BSQ change outputs (#2482)

Manfred Karrer notifications at github.com
Fri Mar 1 22:48:04 UTC 2019

ManfredKarrer commented on this pull request.

> +            }
+        }
+    }
+    ///////////////////////////////////////////////////////////////////////////////////////////
+    // API
+    ///////////////////////////////////////////////////////////////////////////////////////////
+    /**
+     * Once a tx gets committed to out BSQ wallet we store the change output for allowing it to be spent in follow-up
+     * transactions.
+     */
+    public void onCommitTx(Transaction tx, TxType txType, Wallet wallet) {
+        // We remove all potential connected outputs from our inputs as they would have been spent.
+        removeConnectedOutputsOfInputsOfTx(tx);

Yes, if data hanlding stays in sync it should be ok. Still as we manage parallel data now there might be theoretically an issue (e.g. if persistence fails after remove). I will try to test that scenario to verify that we get an exception from BitcoinJ.

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

More information about the bisq-github mailing list