Skip to content

Commit

Permalink
tweak: Use a static coinbase address for pending traces in stream.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Jul 20, 2024
1 parent 52a8b4f commit b1b1beb
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 b1b1beb

Please sign in to comment.