-
Notifications
You must be signed in to change notification settings - Fork 825
[Trivial] add get_best_tip_height to blokchain #50
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
Conversation
22495c9
to
50a9d0f
Compare
I figured tip height it is accessible through get_block(best_tip().bitcoin_hash()).unwrap().height but that's ugly |
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.
I'm going to merge this, but my feeling is that the blockchain
module should really be split out into its own crate, since the focus of rust-bitcoin is mainly de/serialization now.
I also support blockchain out into its own crate. May I go ahaead, as I already worked on otimizing its performance? |
@tamasblummer Yes, I'd love that |
I'd say go for it!
…On March 9, 2018 3:05:09 PM UTC, "Tamás Blummer" ***@***.***> wrote:
I also support blockchain out into its own crate. May I go ahaead, as I
already worked on otimizing its performance?
--
You are receiving this because you are subscribed to this threa
8000
d.
Reply to this email directly or view it on GitHub:
#50 (comment)
|
Working on it. @apoelstra @TheBlueMatt : I think the script interpreter code should also be retired in favor of libbitcoinconsenus. |
Yea the rust implementation is out of date anyway, should almost certainly go (especially since it's a mutually-exclusive-with-Script build option that is non-default)
…On March 9, 2018 3:32:25 PM UTC, "Tamás Blummer" ***@***.***> wrote:
Working on it. @apoelstra @TheBlueMatt : I think the script interpreter
code should also be retired in favor of libbitcoinconsenus.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#50 (comment)
|
Agreed, I'd welcome a PR to remove the script_consensus stuff (or I will make one myself when I get a moment) |
Added input sanitation to policy
tip height is a useful information readily computed by the tree. It is e.g. needed to set the height in a version message that a peer would send. Added a public method to retrieve it.