Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Sep 26, 2024
1 parent 21441a6 commit e0ff54d
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,7 @@ impl BlockTemplateProtocol<'_> {
.cloned()
.ok_or_else(|| MmProxyError::GrpcResponseMissingField("miner_data"))?;

(
add_monero_data(block, monero_mining_data.clone(), miner_data)?,
height,
)
(add_monero_data(block, monero_mining_data.clone(), miner_data)?, height)
};

block_templates
Expand All @@ -214,10 +211,7 @@ impl BlockTemplateProtocol<'_> {
.remove_new_block_template(best_block_hash.to_vec())
.await;

if !self
.check_expected_tip_and_parent(best_block_hash.as_slice())
.await?
{
if !self.check_expected_tip_and_parent(best_block_hash.as_slice()).await? {
debug!(
target: LOG_TARGET,
"Template (height {}) not based on current chain tip anymore (with hash {}), fetching a new block \
Expand Down Expand Up @@ -349,10 +343,7 @@ impl BlockTemplateProtocol<'_> {

/// Check if the height and parent hash is still as expected, so that it still makes sense to compute the block for
/// that height.
async fn check_expected_tip_and_parent(
&mut self,
best_block_hash: &[u8],
) -> Result<bool, MmProxyError> {
async fn check_expected_tip_and_parent(&mut self, best_block_hash: &[u8]) -> Result<bool, MmProxyError> {
let tip = self
.base_node_client
.clone()
Expand Down

0 comments on commit e0ff54d

Please sign in to comment.