From aa1fd5f44c9811e1bf2d62f6234ddad54a31ff69 Mon Sep 17 00:00:00 2001 From: spacebear Date: Thu, 3 Oct 2024 19:39:40 -0400 Subject: [PATCH] Update the doc for InputWeightPrediction::weight() Clarify that the returned weight doesn't include txid, index, or sequence weights. --- bitcoin/src/blockdata/transaction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs index 1759152ba..8fc677957 100644 --- a/bitcoin/src/blockdata/transaction.rs +++ b/bitcoin/src/blockdata/transaction.rs @@ -1304,8 +1304,8 @@ impl InputWeightPrediction { InputWeightPrediction { script_size, witness_size } } - /// Tallies the total weight added to a transaction by an input with this weight prediction, - /// not counting potential witness flag bytes or the witness count varint. + /// Computes the **signature weight** added to a transaction by an input with this weight prediction, + /// not counting the prevout (txid, index), sequence, potential witness flag bytes or the witness count varint. pub const fn weight(&self) -> Weight { Weight::from_wu_usize(self.script_size * 4 + self.witness_size) }