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:
Ryan Ofsky
2023-11-22 16:39:32 -05:00
parent 84502b755b
commit 83436d14f0

View File

@ -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);
} }