@@ -861,31 +861,54 @@ impl BlockchainFactory for RpcBlockchainFactory {
861861
862862#[ cfg( test) ]
863863#[ cfg( any( feature = "test-rpc" , feature = "test-rpc-legacy" ) ) ]
864- mod test {
864+ pub mod test {
865865 use super :: * ;
866- use crate :: {
867- descriptor:: { into_wallet_descriptor_checked, AsDerived } ,
868- testutils:: blockchain_tests:: TestClient ,
869- wallet:: utils:: SecpCtx ,
870- } ;
866+ use crate :: make_blockchain_tests;
867+ use crate :: testutils:: blockchain_tests:: BlockchainType ;
868+ use crate :: testutils:: blockchain_tests:: TestClient ;
871869
872870 use bitcoin:: { Address , Network } ;
873871 use bitcoincore_rpc:: RpcApi ;
874872 use log:: LevelFilter ;
875873 use miniscript:: DescriptorTrait ;
876874
877- crate :: bdk_blockchain_tests! {
878- fn test_instance( test_client: & TestClient ) -> RpcBlockchain {
879- let config = RpcConfig {
880- url: test_client. bitcoind. rpc_url( ) ,
881- auth: Auth :: Cookie { file: test_client. bitcoind. params. cookie_file. clone( ) } ,
882- network: Network :: Regtest ,
883- wallet_name: format!( "client-wallet-test-{}" , std:: time:: SystemTime :: now( ) . duration_since( std:: time:: UNIX_EPOCH ) . unwrap( ) . as_nanos( ) ) ,
884- sync_params: None ,
885- } ;
886- RpcBlockchain :: from_config( & config) . unwrap( )
887- }
888- }
875+ make_blockchain_tests ! [
876+ blockchain BlockchainType :: RpcBlockchain ,
877+ tests (
878+ test_sync_simple,
879+ test_sync_stop_gap_20,
880+ test_sync_before_and_after_receive,
881+ test_sync_multiple_outputs_same_tx,
882+ test_sync_receive_multi,
883+ test_sync_address_reuse,
884+ test_sync_receive_rbf_replaced,
885+ test_sync_after_send,
886+ test_sync_double_receive,
887+ test_sync_many_sends_to_a_single_address,
888+ test_update_confirmation_time_after_generate,
889+ test_sync_outgoing_from_scratch,
890+ test_sync_long_change_chain,
891+ test_sync_bump_fee_basic,
892+ test_sync_bump_fee_add_input_simple,
893+ test_sync_bump_fee_add_input_no_change,
894+ test_sync_receive_coinbase,
895+ test_double_spend,
896+ test_tx_chain
897+ )
898+ ] ;
899+
900+ #[ cfg( not( feature = "test-rpc-legacy" ) ) ]
901+ make_blockchain_tests ! [
902+ blockchain BlockchainType :: RpcBlockchain ,
903+ tests (
904+ test_send_to_bech32m_addr,
905+ test_taproot_key_spend,
906+ test_taproot_script_spend,
907+ test_sign_taproot_core_keyspend_psbt,
908+ test_sign_taproot_core_scriptspend2_psbt,
909+ test_sign_taproot_core_scriptspend3_psbt
910+ )
911+ ] ;
889912
890913 fn get_factory ( ) -> ( TestClient , RpcBlockchainFactory ) {
891914 let test_client = TestClient :: default ( ) ;
0 commit comments