From a5950487f9e7f1cadd5a4d063f152b75a6ef270d Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Tue, 15 Dec 2020 10:15:19 +0100 Subject: [PATCH] go/oasis-node/txsource: Increase submission timeout Sometimes it can take up to two minutes for a transaction to get included in a block due to high load. --- .changelog/3568.internal.md | 4 ++++ go/oasis-node/cmd/debug/txsource/workload/workload.go | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changelog/3568.internal.md diff --git a/.changelog/3568.internal.md b/.changelog/3568.internal.md new file mode 100644 index 00000000000..5a4d7e5b8c0 --- /dev/null +++ b/.changelog/3568.internal.md @@ -0,0 +1,4 @@ +go/oasis-node/txsource: Increase submission timeout + +Sometimes it can take up to two minutes for a transaction to get included in a +block due to high load. diff --git a/go/oasis-node/cmd/debug/txsource/workload/workload.go b/go/oasis-node/cmd/debug/txsource/workload/workload.go index 0f9c7e9f7a2..7f5233a0908 100644 --- a/go/oasis-node/cmd/debug/txsource/workload/workload.go +++ b/go/oasis-node/cmd/debug/txsource/workload/workload.go @@ -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",