-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add xfield to block header #43
Add xfield to block header #43
Conversation
f6c691a
to
012f1fc
Compare
|
rust-bitcoin が基本的に std なしで動くことを保つ方針なので、それを踏襲できればと思っています。 |
@@ -33,7 +37,7 @@ use crate::{io, merkle_tree, VarInt}; | |||
/// ### Bitcoin Core References | |||
/// | |||
/// * [CBlockHeader definition](https://github.com/bitcoin/bitcoin/blob/345457b542b6a980ccfbc868af0970a6f91d1b82/src/primitives/block.h#L20) | |||
#[derive(Copy, PartialEq, Eq, Clone, PartialOrd, Ord, Hash)] | |||
#[derive(PartialEq, Eq, Clone, PartialOrd, Ord, Hash)] |
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.
XField に Copy trait が実装されいていないので Copy を消しているんだと思いますが、 Copy Trait を実装できないんですっけ?
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.
XFieldのUnknown型に含まれるVec<u8>
がCopy traitを実装していないため、それを利用するHeader等にも実装できないです。
今後Tapyrus-Core側でXFieldのタイプが増えた場合でもrust-tapyrus側でブロックを解釈(serialize/deserialize等)できるように、可変長のVec<u8>
を使っています。
see #39