Skip to content

Commit faced38

Browse files
committed
wip
1 parent 5b8b022 commit faced38

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

tests/common/mod.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,20 @@ pub(crate) fn do_channel_full_cycle<E: ElectrumApi>(
511511
vec![addr_a, addr_b],
512512
Amount::from_sat(premine_amount_sat),
513513
);
514-
node_a.sync_wallets().unwrap();
515-
node_b.sync_wallets().unwrap();
514+
515+
// For BitcoindRpc, the initial sync might take a moment. Retry syncing and checking balances.
516+
exponential_backoff_poll(|| {
517+
node_a.sync_wallets().ok()?;
518+
node_b.sync_wallets().ok()?;
519+
let balance_a = node_a.list_balances().spendable_onchain_balance_sats;
520+
let balance_b = node_b.list_balances().spendable_onchain_balance_sats;
521+
if balance_a == premine_amount_sat && balance_b == premine_amount_sat {
522+
Some(())
523+
} else {
524+
None
525+
}
526+
});
527+
516528
assert_eq!(node_a.list_balances().spendable_onchain_balance_sats, premine_amount_sat);
517529
assert_eq!(node_b.list_balances().spendable_onchain_balance_sats, premine_amount_sat);
518530

0 commit comments

Comments
 (0)