[bisq-network/bisq] Speed up "Synchronizing DAO" by ~30% (#5484)

cd2357 notifications at github.com
Sat May 15 22:47:10 CEST 2021


Done, thanks for the speedy review.

> There is missing the chache update when a new block is added in `onNewBlockWithEmptyTxs`.
> Maybe its better to create explicit methods for `daoState.getBlocks().addAll` and `daoState.getBlocks().add` in DaoStateService.

Good point. I restricted the adding of blocks to two new methods, `addBlock` and `addBlocks`. They make sure to update all the indices as well. Also made sure the `DaoState.blocks` list is not exposed directly anymore, but as an unmodifiable list, so no direct modifications are possible.

-- 
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/5484#issuecomment-841722955
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210515/9d98017b/attachment.htm>


More information about the bisq-github mailing list