Skip to content

Commit

Permalink
feat: adds log at txpool
Browse files Browse the repository at this point in the history
  • Loading branch information
ckartik committed May 30, 2024
1 parent 3d61c1d commit 3754635
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]
}

Expand Down

0 comments on commit 3754635

Please sign in to comment.