Skip to content

Commit

Permalink
fix: open strorage trie param error
Browse files Browse the repository at this point in the history
  • Loading branch information
joeylichang committed Aug 12, 2024
1 parent bb167a9 commit 0802a8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/state/caching_versa_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ func (cv *cachingVersaDB) OpenTrie(root common.Hash) (Trie, error) {
return tree, nil
}

func (cv *cachingVersaDB) OpenStorageTrie(stateRoot common.Hash, address common.Address, root common.Hash, _ Trie) (Trie, error) {
func (cv *cachingVersaDB) OpenStorageTrie(root common.Hash, address common.Address, stateRoot common.Hash, _ Trie) (Trie, error) {
if !cv.hasState.Load() {
//TODO:: will change to log.Error after stabilization
panic("open account tree, before open storage tree")
}
if cv.root.Cmp(root) != 0 {
panic("account root mismatch, on open storage tree")
panic(fmt.Sprintf("account root mismatch, on open storage tree, actual: %s, expect: %s", root.String(), cv.root.String()))
}

version, account, err := cv.accTree.getAccountWithVersion(address)
Expand Down

0 comments on commit 0802a8c

Please sign in to comment.