Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
awskii committed Feb 7, 2025
1 parent 0c43a06 commit 0a65d61
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions erigon-lib/commitment/hex_patricia_hashed.go
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,6 @@ func (hph *HexPatriciaHashed) fold() (err error) {
return fmt.Errorf("failed to encode deletion of pre-existed branch: %w", err)
}

// if err = hph.ctx.PutBranch(common.Copy(updateKey), common.Copy(branchUpdate), nil, 0); err != nil {
if err = hph.ctx.PutBranch(updateKey, branchUpdate, nil, 0); err != nil {
return fmt.Errorf("failed to encode deletion of pre-existed branch: %w", err)
}
Expand Down Expand Up @@ -1613,9 +1612,7 @@ func (hph *HexPatriciaHashed) fold() (err error) {
if err != nil {
return fmt.Errorf("failed to encode leaf node update: %w", err)
}
// if err = hph.ctx.PutBranch(common.Copy(updateKey), common.Copy(del), nil, 0); err != nil {
if err = hph.ctx.PutBranch(updateKey, del, nil, 0); err != nil {
// if err = hph.ctx.PutBranch(updateKey, del, nil, 0); err != nil {
return fmt.Errorf("failed to collect leaf node update: %w", err)
}
}
Expand Down Expand Up @@ -1677,8 +1674,6 @@ func (hph *HexPatriciaHashed) fold() (err error) {
return nil
}

// bot kv has to be copied :(
// if err = hph.ctx.PutBranch(common.Copy(updateKey), common.Copy(branchUpdate), prev, prevStep); err != nil {
if err = hph.ctx.PutBranch(updateKey, branchUpdate, prev, prevStep); err != nil {
return fmt.Errorf("failed to collect trie update: %w", err)
}
Expand Down

0 comments on commit 0a65d61

Please sign in to comment.