core, trie: fix all the linters

This commit is contained in:
Péter Szilágyi 2018-01-25 15:05:42 +02:00
parent f0db662be0
commit a3cd57e83b
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D
2 changed files with 5 additions and 5 deletions

View file

@ -852,7 +852,7 @@ var lastWrite uint64
// WriteBlockWithoutState writes only the block and its metadata to the database, // WriteBlockWithoutState writes only the block and its metadata to the database,
// but does not write any state. This is used to construct competing side forks // but does not write any state. This is used to construct competing side forks
// up to teh point where they exceed the canonical total difficulty. // up to the point where they exceed the canonical total difficulty.
func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (err error) { func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (err error) {
bc.wg.Add(1) bc.wg.Add(1)
defer bc.wg.Done() defer bc.wg.Done()
@ -866,7 +866,7 @@ func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (e
return nil return nil
} }
// WriteBlockWithState writes the block and all assocaited state to the database. // WriteBlockWithState writes the block and all associated state to the database.
func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.Receipt, state *state.StateDB) (status WriteStatus, err error) { func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.Receipt, state *state.StateDB) (status WriteStatus, err error) {
bc.wg.Add(1) bc.wg.Add(1)
defer bc.wg.Done() defer bc.wg.Done()

View file

@ -72,7 +72,7 @@ func NewDatabase(diskdb ethdb.Database) *Database {
return &Database{ return &Database{
diskdb: diskdb, diskdb: diskdb,
nodes: map[common.Hash]*cachedNode{ nodes: map[common.Hash]*cachedNode{
common.Hash{}: {children: make(map[common.Hash]int)}, {}: {children: make(map[common.Hash]int)},
}, },
preimages: make(map[common.Hash][]byte), preimages: make(map[common.Hash][]byte),
} }
@ -218,7 +218,7 @@ func (db *Database) dereference(child common.Hash, parent common.Hash) {
if node.children[child] == 0 { if node.children[child] == 0 {
delete(node.children, child) delete(node.children, child)
} }
// If the node does not exist, it's a previously comitted node. // If the node does not exist, it's a previously committed node.
node, ok := db.nodes[child] node, ok := db.nodes[child]
if !ok { if !ok {
return return
@ -289,7 +289,7 @@ func (db *Database) Commit(node common.Hash) error {
// commit is the private locked version of Commit. // commit is the private locked version of Commit.
func (db *Database) commit(hash common.Hash, batch *ethdb.Batch) error { func (db *Database) commit(hash common.Hash, batch *ethdb.Batch) error {
// If the node does not exist, it's a previously comitted node // If the node does not exist, it's a previously committed node
node, ok := db.nodes[hash] node, ok := db.nodes[hash]
if !ok { if !ok {
return nil return nil