Skip to content

Commit 7de7527

Browse files
committed
f Add comment regarding why we retry subscribing
1 parent 6d8dff9 commit 7de7527

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning-transaction-sync/tests/integration_tests.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ fn wait_for_block(min_height: usize) {
6767
let mut header = match get_electrsd().client.block_headers_subscribe() {
6868
Ok(header) => header,
6969
Err(_) => {
70+
// While subscribing should succeed the first time around, we ran into some cases where
71+
// it didn't. Since we can't proceed without subscribing, we try again after a delay
72+
// and panic if it still fails.
7073
std::thread::sleep(Duration::from_secs(3));
7174
get_electrsd().client.block_headers_subscribe().expect("failed to subscribe to block headers")
7275
}

0 commit comments

Comments
 (0)