Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AnieeG committed Dec 18, 2024
1 parent ea81972 commit 599bb5c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions deployment/environment/memory/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ func generateMemoryChain(t *testing.T, inputs map[uint64]EVMChain) map[uint64]de
}
for {
backend.Commit()
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
receipt, err := bind.WaitMined(ctx, backend, tx)
if err != nil || receipt == nil {
return 0, fmt.Errorf("failed to get confirmed receipt for chain %s: %w", chainInfo.ChainName, err)
receipt, err := func() (*types.Receipt, error) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()
return bind.WaitMined(ctx, backend, tx)
}()
if err != nil {
return 0, fmt.Errorf("tx %s failed to confirm: %v, chain %s", tx.Hash().Hex(), err, chainInfo.ChainSelector)
}
if receipt.Status == 0 {
errReason, err := deployment.GetErrorReasonFromTx(chain.Backend.Client(), chain.DeployerKey.From, tx, receipt)
Expand Down

0 comments on commit 599bb5c

Please sign in to comment.