diff --git a/core/state/managed_state_test.go b/core/state/managed_state_test.go index ea5737a089..c2ba82ac80 100644 --- a/core/state/managed_state_test.go +++ b/core/state/managed_state_test.go @@ -29,6 +29,7 @@ func create() (*ManagedState, *account) { db, _ := ethdb.NewMemDatabase() statedb, _ := New(common.Hash{}, db) ms := ManageState(statedb) + ms.StateDB.createObject(addr) ms.StateDB.SetNonce(addr, 100) ms.accounts[addr] = newAccount(ms.StateDB.getStateObject(addr)) return ms, ms.accounts[addr] @@ -116,6 +117,7 @@ func TestSetNonce(t *testing.T) { } addr[0] = 1 + ms.StateDB.createObject(addr) ms.StateDB.SetNonce(addr, 1) if ms.GetNonce(addr) != 1 { diff --git a/core/state/state_test.go b/core/state/state_test.go index 3bc63c1486..2a9060b7ad 100644 --- a/core/state/state_test.go +++ b/core/state/state_test.go @@ -113,6 +113,7 @@ func (s *StateSuite) TestSnapshot(c *checker.C) { data1 := common.BytesToHash([]byte{42}) data2 := common.BytesToHash([]byte{43}) + s.state.createObject(stateobjaddr) // set initial state object value s.state.SetState(stateobjaddr, storageaddr, data1) // get snapshot of current state @@ -143,6 +144,8 @@ func TestSnapshot2(t *testing.T) { stateobjaddr0 := toAddr([]byte("so0")) stateobjaddr1 := toAddr([]byte("so1")) + state.createObject(stateobjaddr0) + state.createObject(stateobjaddr1) var storageaddr common.Hash data0 := common.BytesToHash([]byte{17}) diff --git a/core/state/statedb_test.go b/core/state/statedb_test.go index 597de3be53..84be7d6733 100644 --- a/core/state/statedb_test.go +++ b/core/state/statedb_test.go @@ -116,7 +116,7 @@ func TestIntermediateLeaks(t *testing.T) { } func TestSnapshotRandom(t *testing.T) { - t.Skip("@fjl fix me please") + //t.Skip("@fjl fix me please") config := &quick.Config{MaxCount: 1000} err := quick.Check((*snapshotTest).run, config) if cerr, ok := err.(*quick.CheckError); ok {