Skip to content

Commit 3a2733a

Browse files
authored
Merge pull request #12 from chainstack/fix/trace_filter
Filter method with changed sequence of arguments
2 parents 88e8724 + be33aea commit 3a2733a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cmd/rpcdaemon/commands/trace_api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package commands
33
import (
44
"context"
55
"encoding/json"
6-
76
jsoniter "github.com/json-iterator/go"
7+
88
libcommon "github.com/ledgerwatch/erigon-lib/common"
99
"github.com/ledgerwatch/erigon-lib/kv"
1010

@@ -26,7 +26,7 @@ type TraceAPI interface {
2626
Transaction(ctx context.Context, txHash libcommon.Hash, gasBailOut *bool) (ParityTraces, error)
2727
Get(ctx context.Context, txHash libcommon.Hash, txIndicies []hexutil.Uint64, gasBailOut *bool) (*ParityTrace, error)
2828
Block(ctx context.Context, blockNr rpc.BlockNumber, gasBailOut *bool) (ParityTraces, error)
29-
Filter(ctx context.Context, req TraceFilterRequest, stream *jsoniter.Stream, gasBailOut *bool) error
29+
Filter(ctx context.Context, req TraceFilterRequest, gasBailOut *bool, stream *jsoniter.Stream) error
3030
}
3131

3232
// TraceAPIImpl is implementation of the TraceAPI interface based on remote Db access

cmd/rpcdaemon/commands/trace_filtering.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ func traceFilterBitmapsV3(tx kv.TemporalTx, req TraceFilterRequest, from, to uin
338338
// Filter implements trace_filter
339339
// NOTE: We do not store full traces - we just store index for each address
340340
// Pull blocks which have txs with matching address
341-
func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest, stream *jsoniter.Stream, gasBailOut *bool) error {
341+
func (api *TraceAPIImpl) Filter(ctx context.Context, req TraceFilterRequest, gasBailOut *bool, stream *jsoniter.Stream) error {
342342
if gasBailOut == nil {
343343
gasBailOut = new(bool) // false by default
344344
}

0 commit comments

Comments
 (0)