diff options
Diffstat (limited to 'core/blockchain.go')
-rw-r--r-- | core/blockchain.go | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/core/blockchain.go b/core/blockchain.go index 0de529480..c3530b93c 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -46,9 +46,6 @@ import ( ) var ( - chainlogger = logger.NewLogger("CHAIN") - jsonlogger = logger.NewJsonLogger() - blockInsertTimer = metrics.NewTimer("chain/inserts") ErrNoGenesis = errors.New("Genesis not found in chain") @@ -150,7 +147,7 @@ func NewBlockChain(chainDb ethdb.Database, config *params.ChainConfig, pow pow.P return nil, err } // Check the current state of the block hashes and make sure that we do not have any of the bad blocks in our chain - for hash, _ := range BadHashes { + for hash := range BadHashes { if header := bc.GetHeaderByHash(hash); header != nil { // get the canonical block corresponding to the offending header's number headerByNumber := bc.GetHeaderByNumber(header.Number.Uint64()) @@ -402,10 +399,7 @@ func (bc *BlockChain) ResetWithGenesisBlock(genesis *types.Block) { // Export writes the active chain to the given writer. func (self *BlockChain) Export(w io.Writer) error { - if err := self.ExportN(w, uint64(0), self.currentBlock.NumberU64()); err != nil { - return err - } - return nil + return self.ExportN(w, uint64(0), self.currentBlock.NumberU64()) } // ExportN writes a subset of the active chain to the given writer. @@ -883,7 +877,7 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) { var ( stats = insertStats{startTime: time.Now()} events = make([]interface{}, 0, len(chain)) - coalescedLogs vm.Logs + coalescedLogs []*types.Log nonceChecked = make([]bool, len(chain)) ) @@ -1094,7 +1088,7 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { oldStart = oldBlock newStart = newBlock deletedTxs types.Transactions - deletedLogs vm.Logs + deletedLogs []*types.Log // collectLogs collects the logs that were generated during the // processing of the block that corresponds with the given hash. // These logs are later announced as deleted. @@ -1210,7 +1204,7 @@ func (self *BlockChain) reorg(oldBlock, newBlock *types.Block) error { // postChainEvents iterates over the events generated by a chain insertion and // posts them into the event mux. -func (self *BlockChain) postChainEvents(events []interface{}, logs vm.Logs) { +func (self *BlockChain) postChainEvents(events []interface{}, logs []*types.Log) { // post event logs for further processing self.eventMux.Post(logs) for _, event := range events { |