mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Fixed finality using percent instead of boolean value for block staus…
This commit is contained in:
parent
e712c2a377
commit
5ec2a20aa4
1 changed files with 2 additions and 4 deletions
|
|
@ -854,7 +854,7 @@ func (s *PublicBlockChainAPI) rpcOutputBlock(b *types.Block, inclTx bool, fullTx
|
|||
}
|
||||
var signers []common.Address
|
||||
var filterSigners []common.Address
|
||||
finality := false
|
||||
finality := int32(0)
|
||||
if b.Number().Int64() > 0 {
|
||||
addrBlockSigner := common.HexToAddress(common.BlockSigners)
|
||||
signers, err = contracts.GetSignersFromContract(addrBlockSigner, client, b.Hash())
|
||||
|
|
@ -877,9 +877,7 @@ func (s *PublicBlockChainAPI) rpcOutputBlock(b *types.Block, inclTx bool, fullTx
|
|||
}
|
||||
}
|
||||
}
|
||||
if countFinality >= len(masternodes)*75/100 {
|
||||
finality = true
|
||||
}
|
||||
finality = int32(countFinality * 100 / len(masternodes))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue