Skip to content

Commit

Permalink
Merge pull request #184 from blocknative/TS_static_coinbase
Browse files Browse the repository at this point in the history
tweak: Use a static coinbase address for pending traces in stream.
  • Loading branch information
tyler-smith authored Jul 20, 2024
2 parents b9e6347 + b1b1beb commit 24a5e4b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion eth/filters/trace_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ var blockTraceOpts = blocknative.TracerOpts{
Logs: true,
}

var pendingTraceCoinbaseAddress = common.HexToAddress("000102030405060708090a0b0c0d0e0f10111213")

// TraceNewPendingTransactions creates a subscription that is triggered each time a
// transaction enters the transaction pool. The tx is traced and sent to the client.
func (api *FilterAPI) NewPendingTransactionsWithTrace(ctx context.Context) (*rpc.Subscription, error) {
Expand Down Expand Up @@ -70,8 +72,9 @@ func (api *FilterAPI) NewPendingTransactionsWithTrace(ctx context.Context) (*rpc
var (
currentHeader = api.sys.backend.CurrentHeader()
header = &types.Header{
Coinbase: pendingTraceCoinbaseAddress,

ParentHash: currentHeader.Hash(),
Coinbase: currentHeader.Coinbase,
Difficulty: currentHeader.Difficulty,
GasLimit: currentHeader.GasLimit,
Time: currentHeader.Time + 12,
Expand Down

0 comments on commit 24a5e4b

Please sign in to comment.