[bisq-network/bisq] Add transient tx map to DaoState to speed up getTx queries (#3773)

Steven Barclay notifications at github.com
Tue Dec 10 20:20:41 UTC 2019


stejbac commented on this pull request.



> @@ -226,7 +230,15 @@ public void onNewBlockWithEmptyTxs(Block block) {
         }
     }
 
-    // Third we get the onParseBlockComplete called after all rawTxs of blocks have been parsed
+    // Third we add each successfully parsed BSQ tx to the last block
+    public void onNewTxForLastBlock(Tx tx) {
+        getLastBlock().ifPresent(block -> {
+            block.getTxs().add(tx);

Yes, it would be nice to make Block completely immutable, of course, but I think that would be quite an extensive change. Perhaps a separate addTx method could be added to Block?

-- 
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/3773#discussion_r356257360
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191210/31528f6a/attachment.html>


More information about the bisq-github mailing list