mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
eth/hook: fix parameter mame mismatch in HookPenalties(), close XFN-141 (#1741)
This commit is contained in:
parent
6235de71ba
commit
627d77ae24
1 changed files with 3 additions and 3 deletions
|
|
@ -38,14 +38,14 @@ type RewardLog struct {
|
|||
|
||||
func AttachConsensusV2Hooks(adaptor *XDPoS.XDPoS, bc *core.BlockChain, chainConfig *params.ChainConfig) {
|
||||
// Hook scans for bad masternodes and decide to penalty them
|
||||
adaptor.EngineV2.HookPenalty = func(chain consensus.ChainReader, number *big.Int, currentHash common.Hash, candidates []common.Address) ([]common.Address, error) {
|
||||
adaptor.EngineV2.HookPenalty = func(chain consensus.ChainReader, number *big.Int, parentHash common.Hash, candidates []common.Address) ([]common.Address, error) {
|
||||
start := time.Now()
|
||||
listBlockHash := []common.Hash{}
|
||||
// get list block hash & stats total created block
|
||||
statMiners := make(map[common.Address]int)
|
||||
listBlockHash = append(listBlockHash, currentHash)
|
||||
listBlockHash = append(listBlockHash, parentHash)
|
||||
parentNumber := number.Uint64() - 1
|
||||
parentHash := currentHash
|
||||
currentHash := parentHash
|
||||
|
||||
var round types.Round
|
||||
// check and wait the latest block is already in the disk
|
||||
|
|
|
|||
Loading…
Reference in a new issue