core: initial version of state snapshots

This commit is contained in:
Péter Szilágyi
2019-08-06 13:40:28 +03:00
parent 2a5ed1a1d3
commit 542df8898e
30 changed files with 1635 additions and 85 deletions

View File

@ -149,7 +149,7 @@ func odrAccounts(ctx context.Context, db ethdb.Database, bc *core.BlockChain, lc
st = NewState(ctx, header, lc.Odr())
} else {
header := bc.GetHeaderByHash(bhash)
st, _ = state.New(header.Root, state.NewDatabase(db))
st, _ = state.New(header.Root, state.NewDatabase(db), nil)
}
var res []byte
@ -189,7 +189,7 @@ func odrContractCall(ctx context.Context, db ethdb.Database, bc *core.BlockChain
} else {
chain = bc
header = bc.GetHeaderByHash(bhash)
st, _ = state.New(header.Root, state.NewDatabase(db))
st, _ = state.New(header.Root, state.NewDatabase(db), nil)
}
// Perform read-only call.