@@ -70,10 +70,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
70
70
let pks = & testdata. pubdata . pks ;
71
71
// Generate some blocks
72
72
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 ( ) )
77
74
. unwrap ( ) ;
78
75
assert_eq ! ( blocks. len( ) , 500 ) ;
79
76
@@ -96,10 +93,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
96
93
}
97
94
// Wait for the funds to mature.
98
95
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 ( ) )
103
97
. unwrap ( ) ;
104
98
assert_eq ! ( blocks. len( ) , 50 ) ;
105
99
// Create a PSBT for each transaction.
@@ -194,23 +188,20 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
194
188
) ;
195
189
}
196
190
// 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 ( ) ) ;
201
194
psbts[ i] . inputs [ 0 ] . hash256_preimages . insert (
202
195
sha256d:: Hash :: from_byte_array ( testdata. pubdata . hash256 . to_byte_array ( ) ) ,
203
196
testdata. secretdata . hash256_pre . to_vec ( ) ,
204
197
) ;
205
198
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 ( ) ) ;
214
205
// Finalize the transaction using psbt
215
206
// Let miniscript do it's magic!
216
207
if let Err ( e) = psbts[ i] . finalize_mall_mut ( & secp) {
@@ -230,10 +221,7 @@ pub fn test_from_cpp_ms(cl: &Client, testdata: &TestData) {
230
221
}
231
222
// Finally mine the blocks and await confirmations
232
223
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 ( ) )
237
225
. unwrap ( ) ;
238
226
// Get the required transactions from the node mined in the blocks.
239
227
for txid in spend_txids {
0 commit comments