Browse Source

fix: ldk-node wait for chain sync in regtest (#1444)

tsk 1 tháng trước cách đây
mục cha
commit
34f05d5f8f
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      crates/cdk-integration-tests/src/init_regtest.rs

+ 4 - 0
crates/cdk-integration-tests/src/init_regtest.rs

@@ -402,6 +402,10 @@ pub async fn start_regtest_end(
         generate_block(&bitcoin_client)?;
 
         if let Some(node) = ldk_node {
+            // Sync LDK wallet so it sees its confirmed on-chain balance
+            // This is needed for anchor channel reserves
+            node.sync_wallets()?;
+
             let pubkey = node.node_id();
             let listen_addr = node.listening_addresses();
             let listen_addr = listen_addr.as_ref().unwrap().first().unwrap();