Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Eclésio Junior <eclesiomelo.1@gmail.com>
  • Loading branch information
qdm12 and EclesioMeloJunior committed Dec 16, 2021
1 parent 28abc33 commit f5c72bc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/trie/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func (t *Trie) load(db chaindb.Database, n Node) error {

err = t.load(db, decodedNode)
if err != nil {
return fmt.Errorf("cannot load child with hash 0x%x: %w", hash, err)
return fmt.Errorf("cannot load child at index %d with hash 0x%x: %w", i, hash, err)
}
}

Expand Down Expand Up @@ -275,9 +275,6 @@ func GetFromDB(db chaindb.Database, rootHash common.Hash, key []byte) (
// slice will modify the value of the node in the trie.
func getFromDB(db chaindb.Database, n Node, key []byte) (
value []byte, err error) {
// if parent == nil {
// return nil, nil
// }
leaf, ok := n.(*node.Leaf)
if ok {
if bytes.Equal(leaf.Key, key) {
Expand Down

0 comments on commit f5c72bc

Please sign in to comment.