mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
trie/utils: change Div+Mod to DivMod (#29413)
* trie/utils: change Div+Mod to DivMod * trie/utils: gofmt
This commit is contained in:
parent
e3bdd84e98
commit
15ff066a24
1 changed files with 2 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue