-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update cosmos-sdk version #346
Conversation
pkg/cosmos/client/test_helpers.go
Outdated
// awaitTxCommitted waits for a transaction to be committed on chain and returns the tx receipt | ||
func awaitTxCommitted(t *testing.T, tc *Client, txHash string) (response *txtypes.GetTxResponse, success bool) { | ||
for i := 0; i < 9; i++ { // max poll attempts to wait for tx commitment | ||
txReceipt, err := tc.Tx(txHash) | ||
if err == nil { | ||
return txReceipt, true | ||
} | ||
t.Logf("tx not committed yet (attempt %d)", i+1) | ||
time.Sleep(time.Second * 1) // TODO: configure dynamically based on block times | ||
} | ||
return nil, false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avg observed tx confirmation time was ~5 seconds, this polls for up to 10 seconds (arbitrary). We could set this to the default timeout defined in the Client (30 seconds) however in a testing environment 10 seconds should be sufficient, and increasing the wait duration may increase the duration of tests even more - currently the go unit tests with race detector enabled run for around 560-580 seconds, almost hitting the timeout at 600 seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check out the failing CI action? it looks possibly related: https://github.com/smartcontractkit/chainlink-cosmos/actions/runs/5641454331/job/15279538660?pr=346
@cfal yep I've seen this while working with the core repo, will have to fix in a follow up pr after this one is merged |
https://smartcontract-it.atlassian.net/browse/BCI-1007
Updates the Cosmos SDK to 0.47, fixes breaking changes and deprecations, and also includes some minor formatting cleanup. Summary of main changes:
lint-go