Fix block difficulty resolution

This commit is contained in:
Omar Abdulla
2025-08-06 15:50:00 +03:00
parent f9060772c3
commit 5de7b161c5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -410,7 +410,7 @@ impl ResolverApi for GethNode {
.get_block_by_number(number)
.await?
.ok_or(anyhow::Error::msg("Blockchain has no blocks"))
.map(|block| block.header.difficulty)
.map(|block| U256::from_be_bytes(block.header.mix_hash.0))
}
#[tracing::instrument(skip_all, fields(geth_node_id = self.id))]
+1 -1
View File
@@ -466,7 +466,7 @@ impl ResolverApi for KitchensinkNode {
.get_block_by_number(number)
.await?
.ok_or(anyhow::Error::msg("Blockchain has no blocks"))
.map(|block| block.header.difficulty)
.map(|block| U256::from_be_bytes(block.header.mix_hash.0))
}
#[tracing::instrument(skip_all, fields(kitchensink_node_id = self.id))]