core: initial version of state snapshots
This commit is contained in:
@ -64,7 +64,7 @@ func (h resultHash) Less(i, j int) bool { return bytes.Compare(h[i].Bytes(), h[j
|
||||
func TestAccountRange(t *testing.T) {
|
||||
var (
|
||||
statedb = state.NewDatabase(rawdb.NewMemoryDatabase())
|
||||
state, _ = state.New(common.Hash{}, statedb)
|
||||
state, _ = state.New(common.Hash{}, statedb, nil)
|
||||
addrs = [AccountRangeMaxResults * 2]common.Address{}
|
||||
m = map[common.Address]bool{}
|
||||
)
|
||||
@ -162,7 +162,7 @@ func TestAccountRange(t *testing.T) {
|
||||
func TestEmptyAccountRange(t *testing.T) {
|
||||
var (
|
||||
statedb = state.NewDatabase(rawdb.NewMemoryDatabase())
|
||||
state, _ = state.New(common.Hash{}, statedb)
|
||||
state, _ = state.New(common.Hash{}, statedb, nil)
|
||||
)
|
||||
|
||||
state.Commit(true)
|
||||
@ -188,7 +188,7 @@ func TestEmptyAccountRange(t *testing.T) {
|
||||
func TestStorageRangeAt(t *testing.T) {
|
||||
// Create a state where account 0x010000... has a few storage entries.
|
||||
var (
|
||||
state, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()))
|
||||
state, _ = state.New(common.Hash{}, state.NewDatabase(rawdb.NewMemoryDatabase()), nil)
|
||||
addr = common.Address{0x01}
|
||||
keys = []common.Hash{ // hashes of Keys of storage
|
||||
common.HexToHash("340dd630ad21bf010b4e676dbfa9ba9a02175262d1fa356232cfde6cb5b47ef2"),
|
||||
|
Reference in New Issue
Block a user