diff --git a/applications/minotari_merge_mining_proxy/src/block_template_data.rs b/applications/minotari_merge_mining_proxy/src/block_template_data.rs index 3efea03f77..c5afd3a479 100644 --- a/applications/minotari_merge_mining_proxy/src/block_template_data.rs +++ b/applications/minotari_merge_mining_proxy/src/block_template_data.rs @@ -121,14 +121,8 @@ impl BlockTemplateRepository { pub async fn save_final_block_template_if_key_unique(&self, block_template: FinalBlockTemplateData) { let merge_mining_hash = block_template.aux_chain_mr.to_vec(); let mut b = self.blocks.write().await; - b.entry(merge_mining_hash).or_insert_with(|| { - // trace!( - // target: LOG_TARGET, - // "Saving final block template with merge mining hash: {:?}", - // hex::encode(&merge_mining_hash) - // ); - BlockRepositoryItem::new(block_template) - }); + b.entry(merge_mining_hash) + .or_insert_with(|| BlockRepositoryItem::new(block_template)); } /// Store [NewBlockTemplate] at the hash value if the key does not exist. @@ -359,10 +353,9 @@ pub mod test { let hash2 = vec![2; 32]; let hash3 = vec![3; 32]; let block_template = create_block_template_data(); - btr.save_final_block_template_if_key_unique(hash1.clone(), block_template.clone()) - .await; - btr.save_final_block_template_if_key_unique(hash2.clone(), block_template) + btr.save_final_block_template_if_key_unique(block_template.clone()) .await; + btr.save_final_block_template_if_key_unique(block_template).await; assert!(btr.get_final_template(hash1.clone()).await.is_some()); assert!(btr.get_final_template(hash2.clone()).await.is_some()); assert!(btr.get_final_template(hash3.clone()).await.is_none()); diff --git a/applications/minotari_merge_mining_proxy/src/proxy/inner.rs b/applications/minotari_merge_mining_proxy/src/proxy/inner.rs index 892dc8d7c0..5f200a71c0 100644 --- a/applications/minotari_merge_mining_proxy/src/proxy/inner.rs +++ b/applications/minotari_merge_mining_proxy/src/proxy/inner.rs @@ -136,24 +136,8 @@ impl InnerService { details: "get_tip_info failed".to_string(), } })?; - let height = result - .get_ref() - .metadata - .as_ref() - .map(|meta| meta.best_block_height) - .ok_or(MmProxyError::GrpcResponseMissingField("base node metadata"))?; } - // if result.get_ref().initial_sync_achieved != self.initial_sync_achieved.load(Ordering::SeqCst) { - // self.initial_sync_achieved - // .store(result.get_ref().initial_sync_achieved, Ordering::SeqCst); - // debug!( - // target: LOG_TARGET, - // "Minotari base node initial sync status change to {}", - // result.get_ref().initial_sync_achieved - // ); - // } - - info!( + info!( target: LOG_TARGET, "Monero height = #{}, Minotari base node height = #{}, P2pool height: #{}", monero_height, base_node_height, p2pool_height );