@@ -10,8 +10,8 @@ mod common;
1010use common:: {
1111 do_channel_full_cycle, expect_channel_ready_event, expect_event, expect_payment_received_event,
1212 expect_payment_successful_event, generate_blocks_and_wait, open_channel,
13- premine_and_distribute_funds, premine_dummy_blocks , random_config, setup_bitcoind_and_electrsd,
14- setup_builder , setup_node, setup_two_nodes, wait_for_tx, TestChainSource , TestSyncStore ,
13+ premine_and_distribute_funds, random_config, setup_bitcoind_and_electrsd, setup_builder ,
14+ setup_node, setup_two_nodes, wait_for_tx, TestChainSource , TestSyncStore ,
1515} ;
1616
1717use ldk_node:: config:: EsploraSyncConfig ;
@@ -28,56 +28,55 @@ use std::sync::Arc;
2828#[ test]
2929fn channel_full_cycle ( ) {
3030 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
31- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
31+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
3232 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
3333 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , false ) ;
3434}
3535
3636#[ test]
37- fn channel_full_cycle_bitcoind ( ) {
37+ fn channel_full_cycle_esplora ( ) {
3838 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
39- premine_dummy_blocks ( & bitcoind. client , & electrsd. client ) ;
40- let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind) ;
39+ let chain_source = TestChainSource :: Esplora ( & electrsd) ;
4140 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
4241 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , false ) ;
4342}
4443
4544#[ test]
4645fn channel_full_cycle_force_close ( ) {
4746 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
48- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
47+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
4948 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
5049 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , true ) ;
5150}
5251
5352#[ test]
5453fn channel_full_cycle_force_close_trusted_no_reserve ( ) {
5554 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
56- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
55+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
5756 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , true ) ;
5857 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , true ) ;
5958}
6059
6160#[ test]
6261fn channel_full_cycle_0conf ( ) {
6362 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
64- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
63+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
6564 let ( node_a, node_b) = setup_two_nodes ( & chain_source, true , true , false ) ;
6665 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , true , true , false )
6766}
6867
6968#[ test]
7069fn channel_full_cycle_legacy_staticremotekey ( ) {
7170 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
72- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
71+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
7372 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , false , false ) ;
7473 do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , false , false ) ;
7574}
7675
7776#[ test]
7877fn channel_open_fails_when_funds_insufficient ( ) {
7978 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
80- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
79+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
8180 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
8281
8382 let addr_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -281,7 +280,7 @@ fn start_stop_reinit() {
281280#[ test]
282281fn onchain_spend_receive ( ) {
283282 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
284- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
283+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
285284 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
286285
287286 let addr_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -329,9 +328,9 @@ fn onchain_spend_receive() {
329328
330329#[ test]
331330fn sign_verify_msg ( ) {
332- let ( _bitcoind , electrsd ) = setup_bitcoind_and_electrsd ( ) ;
331+ let ( bitcoind , _electrsd ) = setup_bitcoind_and_electrsd ( ) ;
333332 let config = random_config ( true ) ;
334- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
333+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
335334 let node = setup_node ( & chain_source, config) ;
336335
337336 // Tests arbitrary message signing and later verification
@@ -348,8 +347,8 @@ fn connection_restart_behavior() {
348347}
349348
350349fn do_connection_restart_behavior ( persist : bool ) {
351- let ( _bitcoind , electrsd ) = setup_bitcoind_and_electrsd ( ) ;
352- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
350+ let ( bitcoind , _electrsd ) = setup_bitcoind_and_electrsd ( ) ;
351+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
353352 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , false , false ) ;
354353
355354 let node_id_a = node_a. node_id ( ) ;
@@ -400,8 +399,8 @@ fn do_connection_restart_behavior(persist: bool) {
400399
401400#[ test]
402401fn concurrent_connections_succeed ( ) {
403- let ( _bitcoind , electrsd ) = setup_bitcoind_and_electrsd ( ) ;
404- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
402+ let ( bitcoind , _electrsd ) = setup_bitcoind_and_electrsd ( ) ;
403+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
405404 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
406405
407406 let node_a = Arc :: new ( node_a) ;
@@ -432,7 +431,7 @@ fn concurrent_connections_succeed() {
432431#[ test]
433432fn simple_bolt12_send_receive ( ) {
434433 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
435- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
434+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
436435 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
437436
438437 let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -640,7 +639,7 @@ fn simple_bolt12_send_receive() {
640639#[ test]
641640fn generate_bip21_uri ( ) {
642641 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
643- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
642+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
644643 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
645644
646645 let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -682,7 +681,7 @@ fn generate_bip21_uri() {
682681#[ test]
683682fn unified_qr_send_receive ( ) {
684683 let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
685- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
684+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
686685 let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
687686
688687 let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
0 commit comments