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

sqrrm notifications at github.com
Wed Dec 12 12:41:44 UTC 2018


sqrrm approved this pull request.

utACK

> @@ -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();

This is old code, but wouldn't this return the wrong index if the cycle length has been modified at some point.

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


More information about the bisq-github mailing list