Skip to content

Commit 7e4f88b

Browse files
committed
Remove short-circuit dynafed vote fail for readability
1 parent 285daab commit 7e4f88b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/dynafed.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@ bool NextBlockIsParameterTransition(const CBlockIndex* pindexPrev, const Consens
1919
const uint256 proposal_root = proposal.CalculateRoot();
2020
vote_tally[proposal_root]++;
2121
// Short-circuit once 4/5 threshhold is reached
22-
if (vote_tally[proposal_root] >=
22+
if (!proposal_root.IsNull() && vote_tally[proposal_root] >=
2323
(consensus.dynamic_epoch_length*4)/5) {
2424
winning_entry = proposal;
2525
return true;
2626
}
27-
// Also stop early if "no-vote" crosses 1/4
28-
if (proposal_root.IsNull() &&
29-
vote_tally[proposal_root] > consensus.dynamic_epoch_length/5) {
30-
winning_entry.SetNull();
31-
return false;
32-
}
3327
}
3428
winning_entry.SetNull();
3529
return false;

0 commit comments

Comments
 (0)