From 9414ae6f2a6e98d8089b0edb38c7b1684f723cf6 Mon Sep 17 00:00:00 2001 From: AnilChinchwale Date: Wed, 7 Nov 2018 12:05:58 +0530 Subject: [PATCH] Add penalty feature for prevent signer without sign in epoc make slow --- core/blockchain.go | 4 ++-- eth/backend.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 5b7396dc4a..1495f78001 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -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, diff --git a/eth/backend.go b/eth/backend.go index bd7a370784..d18f17e42b 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -282,7 +282,6 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { } return penSigners, nil } - return []common.Address{}, nil }