[bisq-network/bisq] Add transient tx map to DaoState to speed up getTx queries (#3773)
Julian Knutsen
notifications at github.com
Wed Dec 11 00:49:48 UTC 2019
julianknutsen commented on this pull request.
> @@ -115,6 +116,9 @@ public void applySnapshot(DaoState snapshot) {
daoState.setChainHeight(snapshot.getChainHeight());
+ daoState.getTxMap().clear();
+ daoState.getTxMap().putAll(snapshot.getTxMap());
Yes. Instead of keeping a map of all txns that needs to be kept in sync in the `DaoState` object, the `Block` could just cache the list of transactions for itself and the lookup functions changed from O(txns) to O(blocks). I only bring this up because it would require less complexity and since there are no tests it may make it easier to guarantee correctness through just code review.
--
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_r356355127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191210/87e1d5e5/attachment.html>
More information about the bisq-github
mailing list