diff --git a/tapgarden/custodian.go b/tapgarden/custodian.go index ab33d2d2e..e528b6d66 100644 --- a/tapgarden/custodian.go +++ b/tapgarden/custodian.go @@ -388,7 +388,14 @@ func (c *Custodian) inspectWalletTx(walletTx *lndclient.Transaction) error { // Sleep to give the sender an opportunity to transfer // the proof to the proof courier service. - time.Sleep(defaultProofRetrievalDelay) + // Without this delay our first attempt at retrieving + // the proof will very likely fail. We should expect + // retrieval success before this delay. + select { + case <-time.After(defaultProofRetrievalDelay): + case <-ctx.Done(): + return + } // Attempt to receive proof via proof courier service. loc := proof.Locator{