@@ -3,9 +3,9 @@ use crate::indexer::{chains, BitcoinChainEvent, Indexer, IndexerConfig, StacksCh
33use crate :: integrate:: { MempoolAdmissionData , ServiceStatusData , Status } ;
44use crate :: poke:: load_session;
55use crate :: publish:: { publish_contract, Network } ;
6- use crate :: types:: { self , DevnetConfig , BlockIdentifier } ;
6+ use crate :: types:: { self , BlockIdentifier , DevnetConfig } ;
77use crate :: utils;
8- use crate :: utils:: stacks:: { transactions, StacksRpc , PoxInfo } ;
8+ use crate :: utils:: stacks:: { transactions, PoxInfo , StacksRpc } ;
99use base58:: FromBase58 ;
1010use clarity_repl:: clarity:: representations:: ClarityName ;
1111use clarity_repl:: clarity:: types:: { BuffData , SequenceData , TupleData , Value as ClarityValue } ;
@@ -225,12 +225,15 @@ pub async fn start_events_observer(
225225 init_status. deployer_nonce = 0 ;
226226 }
227227 }
228- Ok ( EventsObserverCommand :: UpdatePoxInfo ) => {
229-
230- }
228+ Ok ( EventsObserverCommand :: UpdatePoxInfo ) => { }
231229 Ok ( EventsObserverCommand :: PublishInitialContracts ) => {
232230 if let Ok ( mut init_status_writer) = init_status_rw_lock. write ( ) {
233- let res = publish_initial_contracts ( & config. devnet_config , & config. accounts , config. deployment_fee_rate , & mut init_status_writer) ;
231+ let res = publish_initial_contracts (
232+ & config. devnet_config ,
233+ & config. accounts ,
234+ config. deployment_fee_rate ,
235+ & mut init_status_writer,
236+ ) ;
234237 if let Some ( tx_count) = res {
235238 let _ = devnet_event_tx. send ( DevnetEvent :: success ( format ! (
236239 "Will publish {} contracts" ,
@@ -241,7 +244,13 @@ pub async fn start_events_observer(
241244 }
242245 Ok ( EventsObserverCommand :: PublishPoxStackingOrders ( block_identifier) ) => {
243246 let bitcoin_block_height = block_identifier. index ;
244- let res = publish_stacking_orders ( & config. devnet_config , & config. accounts , config. deployment_fee_rate , bitcoin_block_height as u32 ) . await ;
247+ let res = publish_stacking_orders (
248+ & config. devnet_config ,
249+ & config. accounts ,
250+ config. deployment_fee_rate ,
251+ bitcoin_block_height as u32 ,
252+ )
253+ . await ;
245254 if let Some ( tx_count) = res {
246255 let _ = devnet_event_tx. send ( DevnetEvent :: success ( format ! (
247256 "Will broadcast {} stacking orders" ,
@@ -354,7 +363,7 @@ pub fn handle_new_block(
354363 }
355364 } ;
356365
357- // Partially update the UI. With current approach a full update
366+ // Partially update the UI. With current approach a full update
358367 // would requires either cloning the block, or passing ownership.
359368 let devnet_events_tx = devnet_events_tx. inner ( ) ;
360369 if let Ok ( tx) = devnet_events_tx. lock ( ) {
@@ -394,7 +403,9 @@ pub fn handle_new_block(
394403 let should_submit_pox_orders = block. metadata . pox_cycle_position == ( pox_cycle_length - 2 ) ;
395404 if should_submit_pox_orders {
396405 if let Ok ( background_job_tx) = background_job_tx_mutex. lock ( ) {
397- let _ = background_job_tx. send ( EventsObserverCommand :: PublishPoxStackingOrders ( block. metadata . bitcoin_anchor_block_identifier . clone ( ) ) ) ;
406+ let _ = background_job_tx. send ( EventsObserverCommand :: PublishPoxStackingOrders (
407+ block. metadata . bitcoin_anchor_block_identifier . clone ( ) ,
408+ ) ) ;
398409 }
399410 }
400411
@@ -491,7 +502,6 @@ pub fn handle_ping() -> Json<JsonValue> {
491502 } ) )
492503}
493504
494-
495505pub fn publish_initial_contracts (
496506 devnet_config : & DevnetConfig ,
497507 accounts : & Vec < Account > ,
@@ -569,7 +579,7 @@ pub async fn publish_stacking_orders(
569579 }
570580
571581 let stacks_node_rpc_url = format ! ( "http://localhost:{}" , devnet_config. stacks_node_rpc_port) ;
572-
582+
573583 let mut transactions = 0 ;
574584 let pox_info: PoxInfo = reqwest:: get ( format ! ( "{}/v2/pox" , stacks_node_rpc_url) )
575585 . await
0 commit comments