mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-30 02:31:05 +02:00
serialization: Drop unnecessary ParamsStream references
Drop unnecessary ParamsStream references from CTransaction and CMutableTransaction constructors. This just couples these classes unnecessarily to the ParamsStream class, making the ParamsStream class harder to modify, and making the transaction classes in some cases (depending on parameter order) unable to work with stream classes that have multiple parameters set.
This commit is contained in:
@ -334,7 +334,7 @@ public:
|
|||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
CTransaction(deserialize_type, const TransactionSerParams& params, Stream& s) : CTransaction(CMutableTransaction(deserialize, params, s)) {}
|
CTransaction(deserialize_type, const TransactionSerParams& params, Stream& s) : CTransaction(CMutableTransaction(deserialize, params, s)) {}
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
CTransaction(deserialize_type, ParamsStream<TransactionSerParams,Stream>& s) : CTransaction(CMutableTransaction(deserialize, s)) {}
|
CTransaction(deserialize_type, Stream& s) : CTransaction(CMutableTransaction(deserialize, s)) {}
|
||||||
|
|
||||||
bool IsNull() const {
|
bool IsNull() const {
|
||||||
return vin.empty() && vout.empty();
|
return vin.empty() && vout.empty();
|
||||||
@ -400,7 +400,7 @@ struct CMutableTransaction
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename Stream>
|
template <typename Stream>
|
||||||
CMutableTransaction(deserialize_type, ParamsStream<TransactionSerParams,Stream>& s) {
|
CMutableTransaction(deserialize_type, Stream& s) {
|
||||||
Unserialize(s);
|
Unserialize(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user