@@ -102,12 +102,33 @@ pub fn block_producer_effects<S: crate::Service>(
102102 BlockProducerEffectfulAction :: BlockUnprovenBuild => {
103103 if let Some ( stats) = store. service . stats ( ) {
104104 let bp = & store. state . get ( ) . block_producer ;
105- if let Some ( ( block_hash, block) ) = bp. with ( None , |bp| match & bp. current {
106- BlockProducerCurrentState :: BlockUnprovenBuilt {
107- block, block_hash, ..
108- } => Some ( ( block_hash, block) ) ,
109- _ => None ,
110- } ) {
105+ if let Some ( ( block_hash, block, just_emitted_ledger_proof) ) =
106+ bp. with ( None , |bp| match & bp. current {
107+ BlockProducerCurrentState :: BlockUnprovenBuilt {
108+ block,
109+ block_hash,
110+ emitted_ledger_proof,
111+ ..
112+ } => Some ( ( block_hash, block, emitted_ledger_proof. is_some ( ) ) ) ,
113+ _ => None ,
114+ } )
115+ {
116+ let ps = & block. protocol_state ;
117+ let cs = & ps. body . consensus_state ;
118+ let previous_state_hash = ps. previous_state_hash . to_string ( ) ;
119+ let state_hash = block_hash. to_string ( ) ;
120+ let global_slot_since_genesis = cs. global_slot_since_genesis . as_u32 ( ) ;
121+ let height = cs. blockchain_length . as_u32 ( ) ;
122+ openmina_core:: info!(
123+ meta. time( ) ;
124+ message = "Unproven block built" ,
125+ state_hash = state_hash,
126+ previous_state_hash = previous_state_hash,
127+ global_slot_since_genesis = global_slot_since_genesis,
128+ height = height,
129+ just_emitted_ledger_proof = just_emitted_ledger_proof,
130+ ) ;
131+
111132 stats
112133 . block_producer ( )
113134 . produced ( meta. time ( ) , block_hash, block) ;
0 commit comments