|
|
@ -149,10 +149,11 @@ func TestSnapshot2(t *testing.T) { |
|
|
|
so0.balance = big.NewInt(42) |
|
|
|
so0.balance = big.NewInt(42) |
|
|
|
so0.nonce = 43 |
|
|
|
so0.nonce = 43 |
|
|
|
so0.SetCode([]byte{'c', 'a', 'f', 'e'}) |
|
|
|
so0.SetCode([]byte{'c', 'a', 'f', 'e'}) |
|
|
|
so0.remove = true |
|
|
|
so0.remove = false |
|
|
|
so0.deleted = false |
|
|
|
so0.deleted = false |
|
|
|
so0.dirty = false |
|
|
|
so0.dirty = true |
|
|
|
state.SetStateObject(so0) |
|
|
|
state.SetStateObject(so0) |
|
|
|
|
|
|
|
state.Commit() |
|
|
|
|
|
|
|
|
|
|
|
// and one with deleted == true
|
|
|
|
// and one with deleted == true
|
|
|
|
so1 := state.GetStateObject(stateobjaddr1) |
|
|
|
so1 := state.GetStateObject(stateobjaddr1) |
|
|
@ -173,6 +174,7 @@ func TestSnapshot2(t *testing.T) { |
|
|
|
state.Set(snapshot) |
|
|
|
state.Set(snapshot) |
|
|
|
|
|
|
|
|
|
|
|
so0Restored := state.GetStateObject(stateobjaddr0) |
|
|
|
so0Restored := state.GetStateObject(stateobjaddr0) |
|
|
|
|
|
|
|
so0Restored.GetState(storageaddr) |
|
|
|
so1Restored := state.GetStateObject(stateobjaddr1) |
|
|
|
so1Restored := state.GetStateObject(stateobjaddr1) |
|
|
|
// non-deleted is equal (restored)
|
|
|
|
// non-deleted is equal (restored)
|
|
|
|
compareStateObjects(so0Restored, so0, t) |
|
|
|
compareStateObjects(so0Restored, so0, t) |
|
|
|