From 6a5eaa189a03a1ec783218ea23f07b71479cf848 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Fri, 14 Jun 2019 13:19:28 -0400 Subject: [PATCH] Remove short-circuit dynafed vote fail for readability --- src/dynafed.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dynafed.cpp b/src/dynafed.cpp index 26dad96c63..a1da6b80cc 100644 --- a/src/dynafed.cpp +++ b/src/dynafed.cpp @@ -19,17 +19,11 @@ bool NextBlockIsParameterTransition(const CBlockIndex* pindexPrev, const Consens const uint256 proposal_root = proposal.CalculateRoot(); vote_tally[proposal_root]++; // Short-circuit once 4/5 threshhold is reached - if (vote_tally[proposal_root] >= + if (!proposal_root.IsNull() && vote_tally[proposal_root] >= (consensus.dynamic_epoch_length*4)/5) { winning_entry = proposal; return true; } - // Also stop early if "no-vote" crosses 1/4 - if (proposal_root.IsNull() && - vote_tally[proposal_root] > consensus.dynamic_epoch_length/5) { - winning_entry.SetNull(); - return false; - } } winning_entry.SetNull(); return false;