[bisq-network/bisq] Redesign dao state monitoring [4] (PR #5782)

chimp1984 notifications at github.com
Mon Nov 8 21:43:10 CET 2021


@chimp1984 commented on this pull request.



> +
+    @Override
+    public void onParseBlockChainComplete() {
+        isParseBlockChainComplete = true;
+
+        // In case we have dao monitoring deactivated we create the snapshot after we are completed with parsing
+        // and we got called back from daoStateMonitoringService once the hashes are created from peers data.
+        if (!preferences.isUseFullModeDaoMonitor()) {
+            // We register a callback handler once the daoStateMonitoringService has received the missing hashes from
+            // the seed node and applied the latest hash. After that we are ready to make a snapshot and persist it.
+            daoStateMonitoringService.setCreateSnapshotHandler(() -> {
+                // As we did not have created any snapshots during initial parsing we create it now. We cannot use the past
+                // snapshot height as we have not cloned a candidate (that would cause quite some delay during parsing).
+                // The next snapshots will be created again according to the snapshot height grid (each 20 blocks).
+                // This also comes with the improvement that the user does not need to load the past blocks back to the last
+                // snapshot height. Thought it comes also with the small risk that in case of re-orgs the user need to do

Fixed

-- 
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/5782#discussion_r745077690
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20211108/8cdcf963/attachment.htm>


More information about the bisq-github mailing list