eth/filters: fix getLogs for pending block (#24949)

* eth/filters: fix pending for getLogs

* add pending method to test backend

* fix block range validation
This commit is contained in:
Sina Mahmoodi
2022-06-07 08:31:19 +02:00
committed by GitHub
parent 7e9514b8c3
commit d9566e39bd
4 changed files with 59 additions and 17 deletions
+1
View File
@@ -65,6 +65,7 @@ type Backend interface {
BlockByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*types.Block, error)
StateAndHeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*state.StateDB, *types.Header, error)
StateAndHeaderByNumberOrHash(ctx context.Context, blockNrOrHash rpc.BlockNumberOrHash) (*state.StateDB, *types.Header, error)
PendingBlockAndReceipts() (*types.Block, types.Receipts)
GetReceipts(ctx context.Context, hash common.Hash) (types.Receipts, error)
GetTd(ctx context.Context, hash common.Hash) *big.Int
GetEVM(ctx context.Context, msg core.Message, state *state.StateDB, header *types.Header, vmConfig *vm.Config) (*vm.EVM, func() error, error)