Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix uncle getter #1087

Merged
merged 2 commits into from May 16, 2016
Merged

Fix uncle getter #1087

merged 2 commits into from May 16, 2016

Conversation

gavofyork
Copy link
Contributor

Uncle blocks don't necessarily have BlockDetails, so can't get total
difficulty directly.
Closes #1057

Uncle blocks don't necessarily have BlockDetails, so can't get total
difficulty directly.
Closes #1057
@gavofyork gavofyork added the A0-pleasereview 🤓 Pull request needs code review. label May 16, 2016
@@ -138,8 +138,8 @@ impl<C, S, A, M, EM> EthClient<C, S, A, M, EM>
gas_limit: uncle.gas_limit,
logs_bloom: uncle.log_bloom,
timestamp: U256::from(uncle.timestamp),
difficulty: uncle.difficulty,
total_difficulty: difficulty,
difficulty: uncle.difficulty + parent_difficulty,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Isn't that total_difficulty?

@arkpar arkpar added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels May 16, 2016
difficulty: uncle.difficulty,
total_difficulty: difficulty,
difficulty: uncle.difficulty + parent_difficulty,
total_difficulty: uncle.difficulty,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be:

-                   difficulty: uncle.difficulty + parent_difficulty,
+                   difficulty: uncle.difficulty,
-                   total_difficulty: uncle.difficulty,
+                   total_difficulty: uncle.difficulty + parent_difficulty,

@debris debris added A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels May 16, 2016
@gavofyork gavofyork added A0-pleasereview 🤓 Pull request needs code review. and removed A4-gotissues 💥 Pull request is reviewed and has significant issues which must be addressed. labels May 16, 2016
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels May 16, 2016
@arkpar arkpar merged commit ab06c92 into master May 16, 2016
@gavofyork gavofyork deleted the fixuncle branch May 23, 2016 17:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants