From 526dba609ae595534621af83e9374e4c0042e880 Mon Sep 17 00:00:00 2001 From: Loong Date: Wed, 2 Sep 2020 13:48:40 +1000 Subject: [PATCH] do not drop inner retry error --- chain/bitcoin/bitcoin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/bitcoin/bitcoin.go b/chain/bitcoin/bitcoin.go index dbf8c0fc..6840651d 100644 --- a/chain/bitcoin/bitcoin.go +++ b/chain/bitcoin/bitcoin.go @@ -288,7 +288,7 @@ func retry(ctx context.Context, dur time.Duration, f func() error) error { log.Printf("retrying: %v", err) select { case <-ctx.Done(): - return ctx.Err() + return fmt.Errorf("%v: %v", ctx.Err(), err) case <-ticker.C: err = f() }