[bisq-network/bisq] Check for result phase at activate method (#3492)

sqrrm notifications at github.com
Mon Oct 28 09:32:34 UTC 2019


sqrrm approved this pull request.

utACK

> @@ -238,7 +239,11 @@ protected void deactivate() {
 
     @Override
     public void onParseBlockCompleteAfterBatchProcessing(Block block) {
-        int chainHeight = daoStateService.getChainHeight();
+        checkForResultPhase(daoStateService.getChainHeight());
+        fillCycleList();
+    }
+
+    private void checkForResultPhase(int chainHeight) {
         if (periodService.getFirstBlockOfPhase(chainHeight, DaoPhase.Phase.RESULT) == chainHeight) {

`periodService.getFirstBlockOfPhase` gets the height of the first block of the current phase so this check will return true for all `chainHeight` in the `RESULT` phase.

-- 
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/3492#pullrequestreview-307723786
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191028/13728f25/attachment-0001.html>


More information about the bisq-github mailing list