From 37546359638baa9dd5062e93528d81b2e3df02a5 Mon Sep 17 00:00:00 2001 From: Kartik Chopra Date: Thu, 30 May 2024 14:21:46 -0400 Subject: [PATCH] feat: adds log at txpool --- eth/api_backend.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eth/api_backend.go b/eth/api_backend.go index 0edcce5c8789..b0625eec2472 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -37,6 +37,7 @@ import ( "github.com/ethereum/go-ethereum/eth/tracers" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/miner" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" @@ -287,7 +288,9 @@ func (b *EthAPIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscri return b.eth.BlockChain().SubscribeLogsEvent(ch) } +// SendTx sends a signed transaction to the transaction pool. func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error { + log.Info("Sending transaction", "tx_hash", signedTx.Hash().Hex()) return b.eth.txPool.Add([]*types.Transaction{signedTx}, true, false)[0] }