-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor BestTipHeight into a generic ChainTip sender and receiver #2676
Conversation
`fastmod BestTipHeight ChainTipSender zebra*` For senders: `fastmod best_tip_height chain_tip_sender zebra*` For receivers: `fastmod best_tip_height chain_tip_receiver zebra*`
And add convenience impls for optional and empty chain tips.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I only added one (small but non-trivial) improvement suggestion.
I've updated the type names in that ticket, and added another impacted type. |
Co-authored-by: Janito Vaqueiro Ferreira Filho <[email protected]>
I applied the approved updates, and we're a few PRs behind, so I admin-merged this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Motivation
In ticket #2639, we want to get block hashes, transaction information, and rollback information out of the state.
The
BestTipHeight
struct already gets block heights out of the state. We can add this other information to it as well.Solution
BestTipHeight
toChainTipSender
best_tip_height
module tochain_tip
ChainTipReceiver
structChainTip
trait to avoid tricky crate dependenciesChainTip
trait in zebra-networkThis refactor does not add any new information, or close any tickets.
Review
@jvff worked on this a few weeks ago.
The code might make more sense once you've had a look at PR #2677, which adds block hashes to the chain tip recevier.
Reviewer Checklist
Follow Up Work
Actually provide all the extra information.