Skip to content

Commit

Permalink
pass configs to StateAtBlock (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
ceyonur committed Jan 12, 2024
1 parent ca92121 commit b5f92be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eth/state_accessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
// apply the upgrades to the [parent] state before returning it.
func (eth *Ethereum) StateAtNextBlock(ctx context.Context, parent *types.Block, nextBlock *types.Block, reexec uint64, base *state.StateDB, readOnly bool, preferDisk bool) (*state.StateDB, tracers.StateReleaseFunc, error) {
// Get state for [parent]
statedb, release, err := eth.StateAtBlock(ctx, parent, reexec, nil, true, false)
statedb, release, err := eth.StateAtBlock(ctx, parent, reexec, base, readOnly, preferDisk)
if err != nil {
return nil, nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion eth/tracers/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (b *testBackend) StateAtBlock(ctx context.Context, block *types.Block, reex
}

func (b *testBackend) StateAtNextBlock(ctx context.Context, parent, nextBlock *types.Block, reexec uint64, base *state.StateDB, readOnly bool, preferDisk bool) (*state.StateDB, StateReleaseFunc, error) {
statedb, release, err := b.StateAtBlock(ctx, parent, reexec, nil, true, false)
statedb, release, err := b.StateAtBlock(ctx, parent, reexec, base, readOnly, preferDisk)
if err != nil {
return nil, nil, err
}
Expand Down

0 comments on commit b5f92be

Please sign in to comment.