Skip to content

Conversation

@luisschwab
Copy link
Member

Closes #109.

This PR adds the missing documentation and a CI job that checks that all objects are documented.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 20112427727

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.654%

Totals Coverage Status
Change from base Build 20087828871: 0.0%
Covered Lines: 1387
Relevant Lines: 1530

💛 - Coveralls

Copy link
Contributor

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c302998

Comments are mostly nits.

/// The [`Txid`] of the [`Transaction`] that created the [`TxOut`].
pub txid: Txid,
/// The output index of the UTXO on the transaction that created the it.
/// The output index of the [`TxOut`] in the [`Transaction`] that created the it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The output index of the [`TxOut`] in the [`Transaction`] that created the it.
/// The output index of the [`TxOut`] in the [`Transaction`] that created it.

}

/// Contains a summary of the transactions for an address.
/// A summary of [`Transaction`]s which an [`Address`] was involved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// A summary of [`Transaction`]s which an [`Address`] was involved.
/// A summary of [`Transaction`]s in which an [`Address`] was involved.

pub txid: Option<Txid>,
/// The input index of this [`TxOut`] in the [`Transaction`] that spent it.
pub vin: Option<u64>,
/// Information about the [`Transaction`] that created this [`TxOut`].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Information about the [`Transaction`] that created this [`TxOut`].
/// Information about the [`Transaction`] that spent this [`TxOut`].

pub merkle_root: bitcoin::hash_types::TxMerkleNode,
/// The [`BlockHash`] of the previous [`Block`] (`None` for the genesis [`Block`]).
pub previousblockhash: Option<BlockHash>,
/// The Merkle root of the [`Block`]'s [`Transaction`]'s.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The Merkle root of the [`Block`]'s [`Transaction`]'s.
/// The Merkle root of the [`Block`]'s [`Transaction`]s.

/// Information about an input from a [`Transaction`].
#[derive(Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct Vin {
/// The [`Txid`] of the [`Transaction`] that created this [`TxOut`].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity I would try to avoid using input and output in the same sentence. "this" should always refer to an instance of the type we're talking about.

 /// Information about an input from a [`Transaction`].
 #[derive(Deserialize, Clone, Debug, PartialEq, Eq)]
 pub struct Vin {
-    /// The [`Txid`] of the [`Transaction`] that created this [`TxOut`].
+    /// The [`Txid`] of the previous [`Transaction`] this input spends from.
     pub txid: Txid,
     /// The output index of the previous output in the [`Transaction`] that created it.
     pub vout: u32,
-    /// Information about this [`TxOut`]'s amount and ScriptPubKey.
-    /// `None` if this is a coinbase output.
+    /// The previous output amount and ScriptPubKey. `None` if this is a coinbase
+    /// input.
     pub prevout: Option<PrevOut>,
-    /// The ScriptSig that allows spending this [`TxOut`].
+    /// The ScriptSig that authorizes spending this input.
     pub scriptsig: ScriptBuf,
-    /// The Witness that allows spending this [`TxOut`], if this is a SegWit output.
+    /// The Witness that authorizes spending this input, if this is a SegWit spend.
     #[serde(deserialize_with = "deserialize_witness", default)]
     pub witness: Vec<Vec<u8>>,
     /// The sequence value for this input, used to set RBF and Locktime behavior.
     pub sequence: u32,
-    /// Whether this input is a coinbase output.
+    /// Whether this is a coinbase input.
     pub is_coinbase: bool,
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The crate should be documented

3 participants