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 {
50
50
}
51
51
52
52
fn generate_blocks_and_wait ( num : usize ) {
53
+ let _miner = MINER_LOCK . lock ( ) . unwrap ( ) ;
53
54
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 ) {
59
55
let address = get_bitcoind ( ) . client . get_new_address ( Some ( "test" ) , Some ( AddressType :: Legacy ) ) . unwrap ( ) ;
60
56
let _block_hashes = get_bitcoind ( ) . client . generate_to_address ( num as u64 , & address) . unwrap ( ) ;
57
+ wait_for_block ( cur_height as usize + num) ;
61
58
}
62
59
63
60
fn wait_for_block ( min_height : usize ) {
92
89
93
90
fn premine ( ) {
94
91
PREMINE . get_or_init ( || {
95
- let _miner = MINER_LOCK . lock ( ) . unwrap ( ) ;
96
92
generate_blocks_and_wait ( 101 ) ;
97
93
} ) ;
98
94
}
You can’t perform that action at this time.
0 commit comments