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:
Animesh Bilthare
2024-01-15 01:46:49 +05:30
parent acbb33bb7b
commit ecd4480331
4 changed files with 79 additions and 5 deletions

View File

@@ -90,6 +90,9 @@ func TestLookoutBreachMatching(t *testing.T) {
DB: db,
EpochRegistrar: backend,
Punisher: punisher,
MinBackoff: time.Second,
MaxBackoff: time.Minute,
MaxNumRetries: 1,
})
if err := watcher.Start(); err != nil {
t.Fatalf("unable to start watcher: %v", err)