aboutsummaryrefslogtreecommitdiff
path: root/src/primitives/transaction.h
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-12-13 09:50:03 +0800
committerfanquake <fanquake@gmail.com>2020-12-13 10:36:22 +0800
commitade38b6ee8f91e441507c0ee7ffe6ca020748991 (patch)
treeed8fff021d24ad21518be4e4011fa269632928c3 /src/primitives/transaction.h
parentb18978066d875707af8e15edf225d3e52b5ade05 (diff)
parentfac39c198324715565897f4240709340477af0bf (diff)
downloadbitcoin-ade38b6ee8f91e441507c0ee7ffe6ca020748991.tar.xz
Merge #20588: Remove unused and confusing CTransaction constructor
fac39c198324715565897f4240709340477af0bf wallet: document that tx in CreateTransaction is purely an out-param (MarcoFalke) faac31521bb7ecbf999541cf918d3750ff589de4 Remove unused and confusing CTransaction constructor (MarcoFalke) Pull request description: The constructor is confusing and dangerous (as explained in the TODO), fix that by removing it. ACKs for top commit: laanwj: Code review ACK fac39c198324715565897f4240709340477af0bf promag: Code review ACK fac39c198324715565897f4240709340477af0bf. theStack: Code review ACK fac39c198324715565897f4240709340477af0bf Tree-SHA512: e0c8cffce8d8ee0166b8e1cbfe85ed0657611e26e2af0d69fde70eceaa5d75cbde3eb489af0428fe4fc431360b4c791fb1cc21b8dee7d4c7a4f17df00836229d
Diffstat (limited to 'src/primitives/transaction.h')
-rw-r--r--src/primitives/transaction.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 00544f64fe..c1e9f0af21 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -287,12 +287,9 @@ private:
uint256 ComputeWitnessHash() const;
public:
- /** Construct a CTransaction that qualifies as IsNull() */
- CTransaction();
-
/** Convert a CMutableTransaction into a CTransaction. */
- explicit CTransaction(const CMutableTransaction &tx);
- CTransaction(CMutableTransaction &&tx);
+ explicit CTransaction(const CMutableTransaction& tx);
+ CTransaction(CMutableTransaction&& tx);
template <typename Stream>
inline void Serialize(Stream& s) const {
@@ -393,7 +390,6 @@ struct CMutableTransaction
};
typedef std::shared_ptr<const CTransaction> CTransactionRef;
-static inline CTransactionRef MakeTransactionRef() { return std::make_shared<const CTransaction>(); }
template <typename Tx> static inline CTransactionRef MakeTransactionRef(Tx&& txIn) { return std::make_shared<const CTransaction>(std::forward<Tx>(txIn)); }
/** A generic txid reference (txid or wtxid). */