Skip to content

Commit

Permalink
Removed commented out function.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed Dec 19, 2023
1 parent 1d410b8 commit 3673e66
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions integration/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,6 @@ func RndBtwTime(min time.Duration, max time.Duration) time.Duration {
return time.Duration(RndBtw(uint64(min.Nanoseconds()), uint64(max.Nanoseconds()))) * time.Nanosecond
}

/*
func AwaitReceiptEth(client ethadapter.EthClient, txHash gethcommon.Hash, timeout time.Duration) error {
var receipt *types.Receipt
var err error
err = retry.Do(func() error {
receipt, err = client.TransactionReceipt(txHash)
if err != nil && !errors.Is(err, rpc.ErrNilResponse) && !errors.Is(err, ethereum.NotFound) {
// we only retry for a nil "not found" response. This is a different error, so we bail out of the retry loop
return retry.FailFast(err)
}
return err
}, retry.NewTimeoutStrategy(timeout, _awaitReceiptPollingInterval))
if err != nil {
return fmt.Errorf("could not retrieve receipt for transaction %s - %w", txHash.Hex(), err)
}
if receipt.Status == types.ReceiptStatusFailed {
return fmt.Errorf("receipt had status failed for transaction %s", txHash.Hex())
}
return nil
}*/

// AwaitReceipt blocks until the receipt for the transaction with the given hash has been received. Errors if the
// transaction is unsuccessful or times out.
func AwaitReceipt(ctx context.Context, client *obsclient.AuthObsClient, txHash gethcommon.Hash, timeout time.Duration) error {
Expand Down

0 comments on commit 3673e66

Please sign in to comment.