mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 20:56:42 +00:00
trie: optimize BinaryTrie.GetAccount using uint256.Int.SetBytes16
This commit is contained in:
parent
8b6bed3578
commit
c1ca7cbc43
1 changed files with 1 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ func (t *BinaryTrie) GetAccount(addr common.Address) (*types.StateAccount, error
|
|||
acc.Nonce = binary.BigEndian.Uint64(values[BasicDataLeafKey][BasicDataNonceOffset:])
|
||||
var balance [16]byte
|
||||
copy(balance[:], values[BasicDataLeafKey][BasicDataBalanceOffset:])
|
||||
acc.Balance = new(uint256.Int).SetBytes(balance[:])
|
||||
acc.Balance = new(uint256.Int).SetBytes16(balance[:])
|
||||
acc.CodeHash = values[CodeHashLeafKey]
|
||||
|
||||
return acc, nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue