watchtower: Add retry logic for fetching blocks
By default, try to fetch the blocks 3 more times in case of error.
This commit is contained in:
4 files changed
+79
-5
No files matched your search
@@ -3,6 +3,7 @@ package watchtower
|
||||
import (
|
||||
"net"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/lightningnetwork/lnd/brontide"
|
||||
@@ -65,6 +66,9 @@ func New(cfg *Config) (*Standalone, error) {
|
||||
DB: cfg.DB,
|
||||
EpochRegistrar: cfg.EpochRegistrar,
|
||||
Punisher: punisher,
|
||||
MinBackoff: time.Second,
|
||||
MaxBackoff: time.Minute,
|
||||
MaxNumRetries: 5,
|
||||
})
|
||||
|
||||
// Create a brontide listener on each of the provided listening
|
||||
|
||||
Reference in new issue
Block a user