When tallying witness/committee member votes, always assign at least
one vote to each witness/committee member for purposes of calculating their weight in the witness-account or committee-account authority. This will likely have no effect in a well established blockchain, but it does occur when a new blockchain is launched for testing without enough votes to fill all the witness/committee slots.
This commit is contained in:
parent
0404e6c0b6
commit
6b86ccc2f3
1 changed files with 2 additions and 2 deletions
|
|
@ -228,7 +228,7 @@ void database::update_active_witnesses()
|
|||
{
|
||||
vote_counter vc;
|
||||
for( const witness_object& wit : wits )
|
||||
vc.add( wit.witness_account, _vote_tally_buffer[wit.vote_id] );
|
||||
vc.add( wit.witness_account, std::max(_vote_tally_buffer[wit.vote_id], UINT64_C(1)) );
|
||||
vc.finish( a.active );
|
||||
}
|
||||
} );
|
||||
|
|
@ -310,7 +310,7 @@ void database::update_active_committee_members()
|
|||
{
|
||||
vote_counter vc;
|
||||
for( const committee_member_object& cm : committee_members )
|
||||
vc.add( cm.committee_member_account, _vote_tally_buffer[cm.vote_id] );
|
||||
vc.add( cm.committee_member_account, std::max(_vote_tally_buffer[cm.vote_id], UINT64_C(1)) );
|
||||
vc.finish( a.active );
|
||||
}
|
||||
} );
|
||||
|
|
|
|||
Loading…
Reference in a new issue