mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/evm: validate blocktest poststate account storage
This commit is contained in:
parent
233db64cc1
commit
a918621882
1 changed files with 6 additions and 0 deletions
|
|
@ -330,6 +330,12 @@ func (t *BlockTest) validatePostState(statedb *state.StateDB) error {
|
|||
if nonce2 != acct.Nonce {
|
||||
return fmt.Errorf("account nonce mismatch for addr: %s want: %d have: %d", addr, acct.Nonce, nonce2)
|
||||
}
|
||||
for k, v := range acct.Storage {
|
||||
v2 := statedb.GetState(addr, k)
|
||||
if v2 != v {
|
||||
return fmt.Errorf("account storage mismatch for addr: %s, slot: %x, want: %x, have: %x", addr, k, v, v2)
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue