@@ -70,10 +70,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
7070 let pks = & testdata. pubdata . pks ;
7171 // Generate some blocks
7272 let blocks = cl
73- . generate_to_address (
74- 500 ,
75- & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) ,
76- )
73+ . generate_to_address ( 500 , & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) )
7774 . unwrap ( ) ;
7875 assert_eq ! ( blocks. len( ) , 500 ) ;
7976
@@ -96,10 +93,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
9693 }
9794 // Wait for the funds to mature.
9895 let blocks = cl
99- . generate_to_address (
100- 50 ,
101- & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) ,
102- )
96+ . generate_to_address ( 50 , & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) )
10397 . unwrap ( ) ;
10498 assert_eq ! ( blocks. len( ) , 50 ) ;
10599 // Create a PSBT for each transaction.
@@ -194,23 +188,20 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
194188 ) ;
195189 }
196190 // Add the hash preimages to the psbt
197- psbts[ i] . inputs [ 0 ] . sha256_preimages . insert (
198- testdata. pubdata . sha256 ,
199- testdata. secretdata . sha256_pre . to_vec ( ) ,
200- ) ;
191+ psbts[ i] . inputs [ 0 ]
192+ . sha256_preimages
193+ . insert ( testdata. pubdata . sha256 , testdata. secretdata . sha256_pre . to_vec ( ) ) ;
201194 psbts[ i] . inputs [ 0 ] . hash256_preimages . insert (
202195 sha256d:: Hash :: from_byte_array ( testdata. pubdata . hash256 . to_byte_array ( ) ) ,
203196 testdata. secretdata . hash256_pre . to_vec ( ) ,
204197 ) ;
205198 println ! ( "{}" , ms) ;
206- psbts[ i] . inputs [ 0 ] . hash160_preimages . insert (
207- testdata. pubdata . hash160 ,
208- testdata. secretdata . hash160_pre . to_vec ( ) ,
209- ) ;
210- psbts[ i] . inputs [ 0 ] . ripemd160_preimages . insert (
211- testdata. pubdata . ripemd160 ,
212- testdata. secretdata . ripemd160_pre . to_vec ( ) ,
213- ) ;
199+ psbts[ i] . inputs [ 0 ]
200+ . hash160_preimages
201+ . insert ( testdata. pubdata . hash160 , testdata. secretdata . hash160_pre . to_vec ( ) ) ;
202+ psbts[ i] . inputs [ 0 ]
203+ . ripemd160_preimages
204+ . insert ( testdata. pubdata . ripemd160 , testdata. secretdata . ripemd160_pre . to_vec ( ) ) ;
214205 // Finalize the transaction using psbt
215206 // Let miniscript do it's magic!
216207 if let Err ( e) = psbts[ i] . finalize_mall_mut ( & secp) {
@@ -230,10 +221,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
230221 }
231222 // Finally mine the blocks and await confirmations
232223 let _blocks = cl
233- . generate_to_address (
234- 10 ,
235- & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) ,
236- )
224+ . generate_to_address ( 10 , & cl. get_new_address ( None , None ) . unwrap ( ) . assume_checked ( ) )
237225 . unwrap ( ) ;
238226 // Get the required transactions from the node mined in the blocks.
239227 for txid in spend_txids {
0 commit comments