@@ -24,7 +24,7 @@ use common::{
2424 generate_listening_addresses, open_channel, open_channel_push_amt, open_channel_with_all,
2525 premine_and_distribute_funds, premine_blocks, prepare_rbf, random_chain_source, random_config,
2626 setup_bitcoind_and_electrsd, setup_builder, setup_node, setup_two_nodes, splice_in_with_all,
27- wait_for_tx, TestChainSource , TestStoreType , TestSyncStore ,
27+ wait_for_tx, TestChainSource , TestConfig , TestStoreType , TestSyncStore ,
2828} ;
2929use electrsd:: corepc_node:: Node as BitcoinD ;
3030use electrsd:: ElectrsD ;
@@ -2556,15 +2556,19 @@ async fn build_0_6_2_node(
25562556}
25572557
25582558async fn build_0_7_0_node (
2559- bitcoind : & BitcoinD , electrsd : & ElectrsD , storage_path : String , esplora_url : String ,
2560- seed_bytes : [ u8 ; 64 ] ,
2559+ bitcoind : & BitcoinD , electrsd : & ElectrsD , esplora_url : String , seed_bytes : [ u8 ; 64 ] ,
2560+ config : & TestConfig ,
25612561) -> ( u64 , bitcoin:: secp256k1:: PublicKey ) {
25622562 let mut builder_old = ldk_node_070:: Builder :: new ( ) ;
25632563 builder_old. set_network ( bitcoin:: Network :: Regtest ) ;
2564- builder_old. set_storage_dir_path ( storage_path ) ;
2564+ builder_old. set_storage_dir_path ( config . node_config . storage_dir_path . clone ( ) ) ;
25652565 builder_old. set_entropy_seed_bytes ( seed_bytes) ;
25662566 builder_old. set_chain_source_esplora ( esplora_url, None ) ;
2567- let node_old = builder_old. build ( ) . unwrap ( ) ;
2567+ let node_old = match config. store_type {
2568+ TestStoreType :: FilesystemStore => builder_old. build_with_fs_store ( ) . unwrap ( ) ,
2569+ TestStoreType :: Sqlite => builder_old. build ( ) . unwrap ( ) ,
2570+ TestStoreType :: TestSyncStore => panic ! ( "TestSyncStore not supported in v0.7.0 builder" ) ,
2571+ } ;
25682572
25692573 node_old. start ( ) . unwrap ( ) ;
25702574 let addr_old = node_old. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
@@ -2605,14 +2609,10 @@ async fn do_persistence_backwards_compatibility(version: OldLdkVersion) {
26052609 . await
26062610 } ,
26072611 OldLdkVersion :: V0_7_0 => {
2608- build_0_7_0_node (
2609- & bitcoind,
2610- & electrsd,
2611- storage_path. clone ( ) ,
2612- esplora_url. clone ( ) ,
2613- seed_bytes,
2614- )
2615- . await
2612+ let mut config = TestConfig :: default ( ) ;
2613+ config. store_type = TestStoreType :: Sqlite ;
2614+ config. node_config . storage_dir_path = storage_path. clone ( ) ;
2615+ build_0_7_0_node ( & bitcoind, & electrsd, esplora_url. clone ( ) , seed_bytes, & config) . await
26162616 } ,
26172617 } ;
26182618
0 commit comments