Improve docs on associated consts
In #3308 we added associated consts to the `Txid`, `Wtxid`, and `OutPoint` types. During review and afterwards we realised the docs could do with improving. Since we now want to move the types we should do this first. Close: #3331
This commit is contained in:
parent
68c9e28165
commit
d69c241b5c
|
@ -67,10 +67,9 @@ impl Txid {
|
||||||
impl Wtxid {
|
impl Wtxid {
|
||||||
/// The `Wtxid` of a coinbase transaction.
|
/// The `Wtxid` of a coinbase transaction.
|
||||||
///
|
///
|
||||||
/// This is used as the wTXID for the coinbase transaction when constructing blocks,
|
/// This is used as the wTXID for the coinbase transaction when constructing blocks (in the
|
||||||
/// since the coinbase transaction contains a commitment to all transactions' wTXIDs
|
/// witness commitment tree) since the coinbase transaction contains a commitment to all
|
||||||
/// but naturally cannot commit to its own. It is not a real wTXID and should not be
|
/// transactions' wTXIDs but naturally cannot commit to its own.
|
||||||
/// used in other contexts.
|
|
||||||
pub const COINBASE: Self = Self::from_byte_array([0; 32]);
|
pub const COINBASE: Self = Self::from_byte_array([0; 32]);
|
||||||
|
|
||||||
/// The "all zeros" wTXID.
|
/// The "all zeros" wTXID.
|
||||||
|
@ -117,7 +116,7 @@ impl OutPoint {
|
||||||
/// The `OutPoint` used in a coinbase prevout.
|
/// The `OutPoint` used in a coinbase prevout.
|
||||||
///
|
///
|
||||||
/// This is used as the dummy input for coinbase transactions because they don't have any
|
/// This is used as the dummy input for coinbase transactions because they don't have any
|
||||||
/// previous outputs. This is not a real outpoint and should not be used in any other contexts.
|
/// previous outputs. In other words, does not point to a real transaction.
|
||||||
pub const COINBASE_PREVOUT: Self = Self { txid: Txid::COINBASE_PREVOUT, vout: u32::MAX };
|
pub const COINBASE_PREVOUT: Self = Self { txid: Txid::COINBASE_PREVOUT, vout: u32::MAX };
|
||||||
|
|
||||||
/// Creates a new [`OutPoint`].
|
/// Creates a new [`OutPoint`].
|
||||||
|
|
Loading…
Reference in New Issue