@@ -10,8 +10,8 @@ mod common;
10
10
use common:: {
11
11
do_channel_full_cycle, expect_channel_ready_event, expect_event, expect_payment_received_event,
12
12
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 ,
15
15
} ;
16
16
17
17
use ldk_node:: config:: EsploraSyncConfig ;
@@ -28,56 +28,55 @@ use std::sync::Arc;
28
28
#[ test]
29
29
fn channel_full_cycle ( ) {
30
30
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
31
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
31
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
32
32
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
33
33
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , false ) ;
34
34
}
35
35
36
36
#[ test]
37
- fn channel_full_cycle_bitcoind ( ) {
37
+ fn channel_full_cycle_esplora ( ) {
38
38
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) ;
41
40
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
42
41
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , false ) ;
43
42
}
44
43
45
44
#[ test]
46
45
fn channel_full_cycle_force_close ( ) {
47
46
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
48
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
47
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
49
48
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
50
49
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , true ) ;
51
50
}
52
51
53
52
#[ test]
54
53
fn channel_full_cycle_force_close_trusted_no_reserve ( ) {
55
54
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
56
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
55
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
57
56
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , true ) ;
58
57
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , true , true ) ;
59
58
}
60
59
61
60
#[ test]
62
61
fn channel_full_cycle_0conf ( ) {
63
62
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
64
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
63
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
65
64
let ( node_a, node_b) = setup_two_nodes ( & chain_source, true , true , false ) ;
66
65
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , true , true , false )
67
66
}
68
67
69
68
#[ test]
70
69
fn channel_full_cycle_legacy_staticremotekey ( ) {
71
70
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
72
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
71
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
73
72
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , false , false ) ;
74
73
do_channel_full_cycle ( node_a, node_b, & bitcoind. client , & electrsd. client , false , false , false ) ;
75
74
}
76
75
77
76
#[ test]
78
77
fn channel_open_fails_when_funds_insufficient ( ) {
79
78
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
80
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
79
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
81
80
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
82
81
83
82
let addr_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -281,7 +280,7 @@ fn start_stop_reinit() {
281
280
#[ test]
282
281
fn onchain_spend_receive ( ) {
283
282
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
284
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
283
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
285
284
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
286
285
287
286
let addr_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -329,9 +328,9 @@ fn onchain_spend_receive() {
329
328
330
329
#[ test]
331
330
fn sign_verify_msg ( ) {
332
- let ( _bitcoind , electrsd ) = setup_bitcoind_and_electrsd ( ) ;
331
+ let ( bitcoind , _electrsd ) = setup_bitcoind_and_electrsd ( ) ;
333
332
let config = random_config ( true ) ;
334
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
333
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
335
334
let node = setup_node ( & chain_source, config) ;
336
335
337
336
// Tests arbitrary message signing and later verification
@@ -348,8 +347,8 @@ fn connection_restart_behavior() {
348
347
}
349
348
350
349
fn 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 ) ;
353
352
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , false , false ) ;
354
353
355
354
let node_id_a = node_a. node_id ( ) ;
@@ -400,8 +399,8 @@ fn do_connection_restart_behavior(persist: bool) {
400
399
401
400
#[ test]
402
401
fn 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 ) ;
405
404
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
406
405
407
406
let node_a = Arc :: new ( node_a) ;
@@ -432,7 +431,7 @@ fn concurrent_connections_succeed() {
432
431
#[ test]
433
432
fn simple_bolt12_send_receive ( ) {
434
433
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
435
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
434
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
436
435
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
437
436
438
437
let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -640,7 +639,7 @@ fn simple_bolt12_send_receive() {
640
639
#[ test]
641
640
fn generate_bip21_uri ( ) {
642
641
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
643
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
642
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
644
643
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
645
644
646
645
let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -682,7 +681,7 @@ fn generate_bip21_uri() {
682
681
#[ test]
683
682
fn unified_qr_send_receive ( ) {
684
683
let ( bitcoind, electrsd) = setup_bitcoind_and_electrsd ( ) ;
685
- let chain_source = TestChainSource :: Esplora ( & electrsd ) ;
684
+ let chain_source = TestChainSource :: BitcoinRpc ( & bitcoind ) ;
686
685
let ( node_a, node_b) = setup_two_nodes ( & chain_source, false , true , false ) ;
687
686
688
687
let address_a = node_a. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
0 commit comments