mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
trie/utils: simplify codeChunkIndex
This commit is contained in:
parent
7aafad2233
commit
d9bf577f92
1 changed files with 1 additions and 5 deletions
|
|
@ -209,11 +209,7 @@ func codeChunkIndex(chunk *uint256.Int) (*uint256.Int, byte) {
|
|||
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 {
|
||||
subIndex = byte(subIndexMod[0])
|
||||
}
|
||||
return treeIndex, subIndex
|
||||
return treeIndex, byte(subIndexMod[0])
|
||||
}
|
||||
|
||||
// CodeChunkKey returns the verkle tree key of the code chunk for the
|
||||
|
|
|
|||
Loading…
Reference in a new issue