diff --git a/core/src/main/java/bisq/core/dao/governance/period/CycleService.java b/core/src/main/java/bisq/core/dao/governance/period/CycleService.java index 9630f68884f..acc4cfa0313 100644 --- a/core/src/main/java/bisq/core/dao/governance/period/CycleService.java +++ b/core/src/main/java/bisq/core/dao/governance/period/CycleService.java @@ -90,7 +90,8 @@ public void addFirstCycle() { } public int getCycleIndex(Cycle cycle) { - return (cycle.getHeightOfFirstBlock() - genesisBlockHeight) / cycle.getDuration(); + Optional previousCycle = getCycle(cycle.getHeightOfFirstBlock() - 1, daoStateService.getCycles()); + return previousCycle.map(cycle1 -> getCycleIndex(cycle1) + 1).orElse(0); } public boolean isTxInCycle(Cycle cycle, String txId) {