File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
testnet/stacks-node/src/burnchains Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -3487,6 +3487,41 @@ mod tests {
34873487 ) ;
34883488 }
34893489
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+ ) ;
3519+ assert ! (
3520+ utxos. is_none( ) ,
3521+ "None because utxos for future block height don't exist"
3522+ ) ;
3523+ }
3524+
34903525 #[ test]
34913526 #[ ignore]
34923527 fn test_build_leader_block_commit_tx_ok_with_new_commit_op ( ) {
You can’t perform that action at this time.
0 commit comments