File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
lightning-transaction-sync/src Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,11 @@ fn get_electrsd() -> &'static ElectrsD {
5050}
5151
5252fn generate_blocks_and_wait ( num : usize ) {
53+ let _miner = MINER_LOCK . lock ( ) . unwrap ( ) ;
5354 let cur_height = get_bitcoind ( ) . client . get_block_count ( ) . unwrap ( ) ;
54- generate_blocks ( num) ;
55- wait_for_block ( cur_height as usize + num) ;
56- }
57-
58- fn generate_blocks ( num : usize ) {
5955 let address = get_bitcoind ( ) . client . get_new_address ( Some ( "test" ) , Some ( AddressType :: Legacy ) ) . unwrap ( ) ;
6056 let _block_hashes = get_bitcoind ( ) . client . generate_to_address ( num as u64 , & address) . unwrap ( ) ;
57+ wait_for_block ( cur_height as usize + num) ;
6158}
6259
6360fn wait_for_block ( min_height : usize ) {
9289
9390fn premine ( ) {
9491 PREMINE . get_or_init ( || {
95- let _miner = MINER_LOCK . lock ( ) . unwrap ( ) ;
9692 generate_blocks_and_wait ( 101 ) ;
9793 } ) ;
9894}
You can’t perform that action at this time.
0 commit comments