mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
fix ZkTrie's GetStorage (#800)
This commit is contained in:
parent
b0b4608450
commit
20a7093f4c
1 changed files with 1 additions and 7 deletions
|
|
@ -27,7 +27,6 @@ import (
|
|||
"github.com/ethereum/go-ethereum/crypto/poseidon"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
"github.com/ethereum/go-ethereum/log"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
"github.com/ethereum/go-ethereum/trie/trienode"
|
||||
)
|
||||
|
||||
|
|
@ -83,12 +82,7 @@ func (t *ZkTrie) GetAccount(address common.Address) (*types.StateAccount, error)
|
|||
|
||||
func (t *ZkTrie) GetStorage(_ common.Address, key []byte) ([]byte, error) {
|
||||
sanityCheckByte32Key(key)
|
||||
enc, err := t.TryGet(key)
|
||||
if err != nil || len(enc) == 0 {
|
||||
return nil, err
|
||||
}
|
||||
_, content, _, err := rlp.Split(enc)
|
||||
return content, err
|
||||
return t.TryGet(key)
|
||||
}
|
||||
|
||||
func (t *ZkTrie) UpdateAccount(address common.Address, acc *types.StateAccount) error {
|
||||
|
|
|
|||
Loading…
Reference in a new issue