Skip to content

Commit

Permalink
go/oasis-node/txsource: Increase submission timeout
Browse files Browse the repository at this point in the history
Sometimes it can take up to two minutes for a transaction to get included in a
block due to high load.
  • Loading branch information
kostko committed Dec 15, 2020
1 parent e6e4b95 commit 2837fb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions go/oasis-node/cmd/debug/txsource/workload/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ func (bw *BaseWorkload) FundSignAndSubmitTx(ctx context.Context, caller signatur
"tx_caller", caller.Public(),
)

// Wait for a maximum of 60 seconds to submit transaction.
submitCtx, cancel := context.WithTimeout(ctx, 60*time.Second)
submitCtx, cancel := context.WithTimeout(ctx, maxSubmissionRetryElapsedTime)
defer cancel()
if err := bw.sm.SignAndSubmitTx(submitCtx, caller, tx); err != nil {
bw.Logger.Error("failed to submit transaction",
Expand Down

0 comments on commit 2837fb2

Please sign in to comment.