mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
core, trie: fix all the linters
This commit is contained in:
parent
f0db662be0
commit
a3cd57e83b
2 changed files with 5 additions and 5 deletions
|
|
@ -852,7 +852,7 @@ var lastWrite uint64
|
|||
|
||||
// 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
|
||||
// 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) {
|
||||
bc.wg.Add(1)
|
||||
defer bc.wg.Done()
|
||||
|
|
@ -866,7 +866,7 @@ func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (e
|
|||
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) {
|
||||
bc.wg.Add(1)
|
||||
defer bc.wg.Done()
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ func NewDatabase(diskdb ethdb.Database) *Database {
|
|||
return &Database{
|
||||
diskdb: diskdb,
|
||||
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),
|
||||
}
|
||||
|
|
@ -218,7 +218,7 @@ func (db *Database) dereference(child common.Hash, parent common.Hash) {
|
|||
if node.children[child] == 0 {
|
||||
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]
|
||||
if !ok {
|
||||
return
|
||||
|
|
@ -289,7 +289,7 @@ func (db *Database) Commit(node common.Hash) error {
|
|||
|
||||
// commit is the private locked version of Commit.
|
||||
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]
|
||||
if !ok {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue