From 8d6228fc1fe72db3ac38ab9c853be0256bed5f24 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Fri, 8 Sep 2023 11:16:06 +0200 Subject: consensus/validation.h: remove needless GetTransactionOutputWeight helper Introduced in 9b7ec393b82ca9d7ada77d06e0835df0386a8b85. This copied the format of the other Get.*Weight helpers but it's useless for a CTxOut. --- src/consensus/validation.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/consensus') diff --git a/src/consensus/validation.h b/src/consensus/validation.h index 8fb638abcf..d5bf08cd61 100644 --- a/src/consensus/validation.h +++ b/src/consensus/validation.h @@ -158,10 +158,6 @@ static inline int64_t GetTransactionInputWeight(const CTxIn& txin) // scriptWitness size is added here because witnesses and txins are split up in segwit serialization. return ::GetSerializeSize(txin, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(txin, PROTOCOL_VERSION) + ::GetSerializeSize(txin.scriptWitness.stack, PROTOCOL_VERSION); } -static inline int64_t GetTransactionOutputWeight(const CTxOut& txout) -{ - return ::GetSerializeSize(txout, PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS) * (WITNESS_SCALE_FACTOR - 1) + ::GetSerializeSize(txout, PROTOCOL_VERSION); -} /** Compute at which vout of the block's coinbase transaction the witness commitment occurs, or -1 if not found */ inline int GetWitnessCommitmentIndex(const CBlock& block) -- cgit v1.2.3