Skip to content

Commit

Permalink
print out account sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Jul 31, 2024
1 parent 93774a7 commit 6f8f70a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rpc/core/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ func BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadca
// More: https://docs.cometbft.com/v0.34/rpc/#/Tx/broadcast_tx_sync
func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
resCh := make(chan *abci.Response, 1)
err := GetEnvironment().Mempool.CheckTx(tx, func(res *abci.Response) {
env := GetEnvironment()
env.Logger.Info("BroadcastTxSync")
err := env.Mempool.CheckTx(tx, func(res *abci.Response) {
select {
case <-ctx.Context().Done():
case resCh <- res:
}

}, mempl.TxInfo{})
if err != nil {
fmt.Println("Error on broadcastTxSync", err)
env.Logger.Error("Error on broadcastTxSync", "err", err)
return nil, err
}

Expand Down

0 comments on commit 6f8f70a

Please sign in to comment.