Skip to content

Commit

Permalink
chore(rpc): broadcasttx timeout 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Jan 16, 2024
1 parent 96d9aa3 commit 68a9a7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/rpc/core/mempool.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ func (env *Environment) BroadcastTxSync(ctx context.Context, req *coretypes.Requ
// DeliverTx result.
// More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync
func (env *Environment) BroadcastTx(ctx context.Context, req *coretypes.RequestBroadcastTx) (*coretypes.ResultBroadcastTx, error) {
ctx, cancel := context.WithTimeout(ctx, 1*time.Second)
defer cancel()

resCh := make(chan *abci.ResponseCheckTx, 1)
err := env.Mempool.CheckTx(
ctx,
Expand Down

0 comments on commit 68a9a7a

Please sign in to comment.