File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
testnet/stacks-node/src/burnchains Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -3487,6 +3487,38 @@ mod tests {
3487
3487
) ;
3488
3488
}
3489
3489
3490
+ #[ test]
3491
+ #[ ignore]
3492
+ fn test_get_utxos_none_due_to_filter_block_height ( ) {
3493
+ if env:: var ( "BITCOIND_TEST" ) != Ok ( "1" . into ( ) ) {
3494
+ return ;
3495
+ }
3496
+
3497
+ let miner_pubkey = utils:: create_miner1_pubkey ( ) ;
3498
+
3499
+ let mut config = utils:: create_config ( ) ;
3500
+ config. burnchain . local_mining_public_key = Some ( miner_pubkey. to_hex ( ) ) ;
3501
+
3502
+ let mut btcd_controller = BitcoinCoreController :: new ( config. clone ( ) ) ;
3503
+ btcd_controller
3504
+ . start_bitcoind ( )
3505
+ . expect ( "bitcoind should be started!" ) ;
3506
+
3507
+ let btc_controller = BitcoinRegtestController :: new ( config. clone ( ) , None ) ;
3508
+ btc_controller. bootstrap_chain ( 101 ) ; // one utxo exists
3509
+
3510
+ //NOTE: Operation stall if burn block at block_height doesn't exist
3511
+ let future_block_height = 102 ;
3512
+ let utxos = btc_controller. get_utxos (
3513
+ StacksEpochId :: Epoch31 ,
3514
+ & miner_pubkey,
3515
+ 1 ,
3516
+ None ,
3517
+ future_block_height) ;
3518
+ assert ! ( utxos. is_none( ) ,
3519
+ "None because utxos for future block height don't exist" ) ;
3520
+ }
3521
+
3490
3522
#[ test]
3491
3523
#[ ignore]
3492
3524
fn test_build_leader_block_commit_tx_ok_with_new_commit_op ( ) {
You can’t perform that action at this time.
0 commit comments