[bisq-network/bisq] Fix reorg issues with phases (#2117)

Manfred Karrer notifications at github.com
Wed Dec 12 13:24:53 UTC 2018


ManfredKarrer commented on this pull request.



> @@ -96,6 +96,28 @@ public void onParseBlockChainComplete() {
     // API
     ///////////////////////////////////////////////////////////////////////////////////////////
 
+    public void addFirstCycle() {
+        daoStateService.getCycles().add(getFirstCycle());
+    }
+
+    public int getCycleIndex(Cycle cycle) {
+        return (cycle.getHeightOfFirstBlock() - genesisBlockHeight) / cycle.getDuration();

Would need to look closer to the caller. Might be that the caller has an old cycle and that cause issues. Anyway that reorg topic will require more testing and effort to cover all edge cases. So I leave that for upcoming PRs...

-- 
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/2117#discussion_r241011491
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20181212/cb2d3b4e/attachment.html>


More information about the bisq-github mailing list