-
Notifications
You must be signed in to change notification settings - Fork 825
Rename TxOutRef
to OutPoint
and use it in TxIn
.
#139
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
b17d2d2
to
92a2644
Compare
cc @TheBlueMatt concept ack? This is the correct term right? |
src/blockdata/transaction.rs
Outdated
/// The referenced transaction's txid | ||
pub txid: Sha256dHash, | ||
/// The index of the referenced output in its transaction's vout | ||
pub index: usize | ||
pub index: u32, |
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.
Can you call this vout
instead of index
?
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.
Yea, nomenclature is right.
src/blockdata/transaction.rs
Outdated
/// | ||
/// let block = genesis_block(Network::Bitcoin); | ||
/// let tx = &block.txdata[0]; | ||
/// |
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.
nit: Trailing space here
src/blockdata/transaction.rs
Outdated
/// ```rust | ||
/// use bitcoin::blockdata::constants::genesis_block; | ||
/// use bitcoin::network::constants::Network; | ||
/// |
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.
nit: Trailing space here
92a2644
to
2798609
Compare
Done |
txid: Default::default(), | ||
vout: u32::max_value(), | ||
} | ||
} |
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.
Can you make this function be the Default::default
implementation of the Outpoint
type? You can also have the explicit method.
ACK aside from |
Previously this structure was unused, it's now being used by the `TxIn` structure to simplify the code a little bit and avoid confusions. Also the rust-lightning source code has an `OutPoint` similar to this one but with the `vout` index as an `u16` to avoid unsafe conversions. I've added to new methods to `OutPoint`: - `null`: Creates a new "null" `OutPoint`. - `is_null`: Checks if the given `OutPoint` is null. Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
2798609
to
32631e4
Compare
Done |
Add v0.20.0 and v0.20.1
No description provided.