A fix for #173 when noBalanceQuorumCount check is done with quorum count 5 or 6.
Explanation
noBalanceQuorumCount is initialised to zero and incremented each time a quorum doesn't have enough tokens to pledge. Rubix PBFT consensus requires 5 nodes to pledge and hence as soon as noBalanceQuorumCount reaches greater than 2 , sender exit. The problem is when there are only 5 or 6 quorum nodes where in such situtaions , we should exit as soon as we realise we will not have 5 nodes that can pledge. Currently the sender wait 300 seconds before exiting with a different error code.
Fix
Initialise noBalanceQuorumCount to QuorumRequired - len(cr.QuorumList)
cr.QuorumList
noBalanceQuorumCount
7
0
6
1
5
2
PS : Also renaming quorumCount in quorum.go to quorumAddrCount to avoid naming confusion.
A fix for #173 when
noBalanceQuorumCount
check is done with quorum count 5 or 6.Explanation
noBalanceQuorumCount
is initialised to zero and incremented each time a quorum doesn't have enough tokens to pledge. Rubix PBFT consensus requires 5 nodes to pledge and hence as soon asnoBalanceQuorumCount
reaches greater than 2 , sender exit. The problem is when there are only 5 or 6 quorum nodes where in such situtaions , we should exit as soon as we realise we will not have 5 nodes that can pledge. Currently the sender wait 300 seconds before exiting with a different error code.Fix
Initialise
noBalanceQuorumCount
toQuorumRequired - len(cr.QuorumList)
PS : Also renaming
quorumCount
in quorum.go toquorumAddrCount
to avoid naming confusion.