Skip to content

Commit

Permalink
Update pkg/trie/triedb/nibbles/nibbles.go
Browse files Browse the repository at this point in the history
Co-authored-by: Haiko Schol <[email protected]>
  • Loading branch information
timwu20 and haikoschol authored Oct 11, 2024
1 parent 6707bee commit bed20e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/trie/triedb/nibbles/nibbles.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (n Nibbles) Len() uint {

// Advance the view on the slice by i nibbles.
func (n *Nibbles) Advance(i uint) {
if !(n.Len() >= i) {
if n.Len() < i {
panic("not enough nibbles to advance")
}
n.offset += i
Expand Down

0 comments on commit bed20e2

Please sign in to comment.