@@ -12721,7 +12721,29 @@ fn test_sip_031_activation() {
12721
12721
12722
12722
wait_for_first_naka_block_commit ( 60 , & commits_submitted) ;
12723
12723
12724
- // mine until epooch 3.2 height
12724
+ // retrieve current liquidity
12725
+ let last_block_id = StacksBlockId :: from_hex (
12726
+ & test_observer:: get_blocks ( )
12727
+ . last ( )
12728
+ . unwrap ( )
12729
+ . get ( "index_block_hash" )
12730
+ . unwrap ( )
12731
+ . as_str ( )
12732
+ . unwrap ( ) [ 2 ..] ,
12733
+ )
12734
+ . unwrap ( ) ;
12735
+
12736
+ let sip_031_initial_total_liquid_ustx = chainstate
12737
+ . with_read_only_clarity_tx (
12738
+ & sortdb
12739
+ . index_handle_at_block ( & chainstate, & last_block_id)
12740
+ . unwrap ( ) ,
12741
+ & last_block_id,
12742
+ |conn| conn. with_clarity_db_readonly ( |db| db. get_total_liquid_ustx ( ) . unwrap ( ) ) ,
12743
+ )
12744
+ . unwrap ( ) ;
12745
+
12746
+ // mine until epoch 3.2 height
12725
12747
loop {
12726
12748
let commits_before = commits_submitted. load ( Ordering :: SeqCst ) ;
12727
12749
next_block_and_process_new_stacks_block ( & mut btc_regtest_controller, 60 , & coord_channel)
@@ -12798,6 +12820,19 @@ fn test_sip_031_activation() {
12798
12820
} ) )
12799
12821
) ;
12800
12822
12823
+ // check liquidity has been updated accordingly
12824
+ let sip_031_total_liquid_ustx = chainstate
12825
+ . with_read_only_clarity_tx (
12826
+ & sortdb
12827
+ . index_handle_at_block ( & chainstate, & latest_stacks_block_id)
12828
+ . unwrap ( ) ,
12829
+ & latest_stacks_block_id,
12830
+ |conn| conn. with_clarity_db_readonly ( |db| db. get_total_liquid_ustx ( ) . unwrap ( ) ) ,
12831
+ )
12832
+ . unwrap ( ) ;
12833
+
12834
+ assert ! ( sip_031_total_liquid_ustx - sip_031_initial_total_liquid_ustx >= SIP_031_INITIAL_MINT ) ;
12835
+
12801
12836
// check if the coinbase activation block receipt has the mint event
12802
12837
let mut mint_event_found: Option < serde_json:: Value > = None ;
12803
12838
let mut coinbase_txid: Option < String > = None ;
0 commit comments