Fixed only half MNs can be mining block.

This commit is contained in:
DinhLN 2018-12-10 13:37:40 +07:00
parent 780a91e76f
commit a064131488

View file

@ -483,6 +483,7 @@ func WhoIsCreator(snap *Snapshot, header *types.Header) (common.Address, error)
} }
func YourTurn(masternodes []common.Address, snap *Snapshot, header *types.Header, cur common.Address) (int, int, bool, error) { func YourTurn(masternodes []common.Address, snap *Snapshot, header *types.Header, cur common.Address) (int, int, bool, error) {
masternodes = masternodes[:len(masternodes)/2+1]
if len(masternodes) == 0 { if len(masternodes) == 0 {
return -1, -1, true, nil return -1, -1, true, nil
} }