mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Remove short-circuit dynafed vote fail for readability
This commit is contained in:
parent
dddc040aa0
commit
6a5eaa189a
1 changed files with 1 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue