diff --git a/trie/utils/verkle.go b/trie/utils/verkle.go index ce059edc6438..52e41f524352 100644 --- a/trie/utils/verkle.go +++ b/trie/utils/verkle.go @@ -206,9 +206,8 @@ func CodeSizeKey(address []byte) []byte { func codeChunkIndex(chunk *uint256.Int) (*uint256.Int, byte) { var ( - chunkOffset = new(uint256.Int).Add(codeOffset, chunk) - treeIndex = new(uint256.Int).Div(chunkOffset, verkleNodeWidth) - subIndexMod = new(uint256.Int).Mod(chunkOffset, verkleNodeWidth) + chunkOffset = new(uint256.Int).Add(codeOffset, chunk) + treeIndex, subIndexMod = new(uint256.Int).DivMod(chunkOffset, verkleNodeWidth, new(uint256.Int)) ) var subIndex byte if len(subIndexMod) != 0 {