forked from cerc-io/plugeth
core: use TryGetAccount to read what TryUpdateAccount has written (#25458)
* core: use TryGetAccount to read where TryUpdateAccount has been used to write * Gary's review feedback * implement Gary's suggestion * fix bug + rename NewSecure into NewStateTrie * trie: add backwards-compatibility aliases for SecureTrie * Update database.go * make the linter happy Co-authored-by: Felix Lange <fjl@twurst.com> Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
This commit is contained in:
co-authored by
Felix Lange
rjl493456442
parent
8b53b92eb4
commit
f67e54c92f
+2
-2
@@ -506,11 +506,11 @@ func (api *DebugAPI) getModifiedAccounts(startBlock, endBlock *types.Block) ([]c
|
||||
}
|
||||
triedb := api.eth.BlockChain().StateCache().TrieDB()
|
||||
|
||||
oldTrie, err := trie.NewSecure(common.Hash{}, startBlock.Root(), triedb)
|
||||
oldTrie, err := trie.NewStateTrie(common.Hash{}, startBlock.Root(), triedb)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
newTrie, err := trie.NewSecure(common.Hash{}, endBlock.Root(), triedb)
|
||||
newTrie, err := trie.NewStateTrie(common.Hash{}, endBlock.Root(), triedb)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user