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

chimp1984 notifications at github.com
Wed Dec 11 19:09:50 UTC 2019


> Is there a reason why you did not use `daoState.getTxMap().values()` instead of `getBlocks().stream().flatMap(block -> block.getTxs()` in `public Stream<Tx> getTxStream()` in `DaoStateService`? It is only used by the `ExportJsonFilesService`.

Ah, the original method delivers the txs ordered by blocks and inside blocks the txs are ordered by inter-block dependencies (as we get it from Bitcoin core). But the `maybeExportToJson` method only dumps the txs as files to disc so the ordering is not required. So I think it is safe to use the `getUnorderedTxStream()` method instead and delete the `getTxStream()` method (and making `getUnorderedTxStream()` public).

-- 
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#issuecomment-564688589
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191211/f0a0b252/attachment.html>


More information about the bisq-github mailing list