From b1b1bebe3783344cef5d08347d4ac4ec17d124a8 Mon Sep 17 00:00:00 2001 From: Tyler Smith Date: Sat, 20 Jul 2024 18:00:11 -0400 Subject: [PATCH] tweak: Use a static coinbase address for pending traces in stream. --- eth/filters/trace_api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eth/filters/trace_api.go b/eth/filters/trace_api.go index f6eacb4b0420..43473c4a3bc8 100644 --- a/eth/filters/trace_api.go +++ b/eth/filters/trace_api.go @@ -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) { @@ -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,