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

Julian Knutsen notifications at github.com
Wed Dec 11 01:25:36 UTC 2019


julianknutsen commented on this pull request.



> @@ -348,16 +360,16 @@ public Coin getGenesisTotalSupply() {
                 .flatMap(block -> block.getTxs().stream());
     }
 
-    public TreeMap<String, Tx> getTxMap() {
-        return new TreeMap<>(getTxStream().collect(Collectors.toMap(Tx::getId, tx -> tx)));
+    public Map<String, Tx> getTxMap() {

I'm always in favor of removing 1-line functions as well as public functions that are unused. Just one less way for people to do the wrong thing in the future.

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


More information about the bisq-github mailing list