forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
Description
the code offset is 1 << 240
and the code chunk is never more than 24kb (maybe 64kb in the future). We can't save an allocation, but we could rewrite codeChunkIndex
as such:
func codeChunkIndex(chunk uint64) (*uint256.Int, byte) {
treeIndex := new(uint256.Int)
treeIndex[3] = (1 << 48)
treeIndex[0] = chunk / 8
return treeIndex, byte(chunk)
}