Skip to content

Commit 3a16495

Browse files
committed
fix unit tests; update config docs
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
1 parent 956077a commit 3a16495

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc-site/docs/reference/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ title: Configuration Reference
754754
|---|-----------|----|-------------|
755755
|count|The maximum number of times to retry|`int`|`5`
756756
|enabled|Enables retries|`boolean`|`false`
757-
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`<nil>`
757+
|errorStatusCodeRegex|The regex that the error response status code must match to trigger retry|`string`|`^5|^429$`
758758
|initWaitTime|The initial retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`250ms`
759759
|maxWaitTime|The maximum retry delay|[`time.Duration`](https://pkg.go.dev/time#Duration)|`30s`
760760

internal/blockchain/ethereum/ethereum.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func (e *Ethereum) invokeContractMethod(ctx context.Context, address, signingKey
627627
if err != nil || !res.IsSuccess() {
628628
// 409 is a conflict error, so that means the transaction was already submitted / exists
629629
// so we can return a success w/o error
630-
if res.StatusCode() == 409 && !resErr.SubmissionRejected {
630+
if res != nil && res.StatusCode() == 409 && !resErr.SubmissionRejected {
631631
return false, nil
632632
}
633633

@@ -774,7 +774,7 @@ func (e *Ethereum) DeployContract(ctx context.Context, nsOpID, signingKey string
774774
if err != nil || !res.IsSuccess() {
775775
// 409 is a conflict error, so that means the transaction was already submitted / exists
776776
// so we can return a success w/o error
777-
if res.StatusCode() == 409 && !resErr.SubmissionRejected {
777+
if res != nil && res.StatusCode() == 409 && !resErr.SubmissionRejected {
778778
return false, nil
779779
}
780780
if strings.Contains(string(res.Body()), "FFEC100130") {

0 commit comments

Comments
 (0)