Skip to content

Commit

Permalink
EncodeBranch: no copy (#12993)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Dec 5, 2024
1 parent fb3bd06 commit 19b1959
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions erigon-lib/commitment/commitment.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,8 @@ func (be *BranchEncoder) EncodeBranch(bitmap, touchMap, afterMap uint16, readCel
}
bitset ^= bit
}
res := make([]byte, be.buf.Len())
copy(res, be.buf.Bytes())

//fmt.Printf("EncodeBranch [%x] size: %d\n", be.buf.Bytes(), be.buf.Len())
return res, lastNibble, nil
return be.buf.Bytes(), lastNibble, nil
}

func RetrieveCellNoop(nibble int, skip bool) (*cell, error) { return nil, nil }
Expand Down

0 comments on commit 19b1959

Please sign in to comment.