Add penalty feature for prevent signer without sign in epoc make slow down chain.

Fixed duplicate nonce value for randomize and sign txs

Fixed prevent signers penaltied return in 4 epocs sequent.
This commit is contained in:
DinhLN 2018-10-04 15:15:32 +07:00 committed by Tuna
parent 74670cbe50
commit 3a49a4af4f
2 changed files with 5 additions and 6 deletions

View file

@ -690,7 +690,7 @@ func (bc *BlockChain) procFutureBlocks() {
// Insert one by one as chain insertion needs contiguous ancestry between blocks
for i := range blocks {
bc.InsertChain(blocks[i : i+1])
bc.InsertChain(blocks[i: i+1])
}
}
}
@ -1243,7 +1243,7 @@ func (st *insertStats) report(chain []*types.Block, index int, cache common.Stor
if index == len(chain)-1 || elapsed >= statsReportLimit {
var (
end = chain[index]
txs = countTransactions(chain[st.lastIndex : index+1])
txs = countTransactions(chain[st.lastIndex: index+1])
)
context := []interface{}{
"blocks", st.processed, "txs", txs, "mgas", float64(st.usedGas) / 1000000,

View file

@ -282,7 +282,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) {
}
return penSigners, nil
}
return []common.Address{}, nil
}