@@ -90,25 +90,32 @@ CAmount GetDustThreshold(const CTxOut& txout, const CFeeRate& dustRelayFee);
90
90
bool IsDust (const CTxOut& txout, const CFeeRate& dustRelayFee);
91
91
92
92
bool IsStandard (const CScript& scriptPubKey, TxoutType& whichType);
93
- /* *
94
- * Check for standard transaction types
95
- * @return True if all outputs (scriptPubKeys) use only standard transaction forms
96
- */
93
+
94
+
95
+ // Changing the default transaction version requires a two step process: first
96
+ // adapting relay policy by bumping TX_MAX_STANDARD_VERSION, and then later
97
+ // allowing the new transaction version in the wallet/RPC.
98
+ static constexpr decltype (CTransaction::nVersion) TX_MAX_STANDARD_VERSION{2 };
99
+
100
+ /* *
101
+ * Check for standard transaction types
102
+ * @return True if all outputs (scriptPubKeys) use only standard transaction forms
103
+ */
97
104
bool IsStandardTx (const CTransaction& tx, bool permit_bare_multisig, const CFeeRate& dust_relay_fee, std::string& reason);
98
- /* *
99
- * Check for standard transaction types
100
- * @param[in] mapInputs Map of previous transactions that have outputs we're spending
101
- * @param[in] taproot_active Whether or taproot consensus rules are active (used to decide whether spends of them are permitted)
102
- * @return True if all inputs (scriptSigs) use only standard transaction forms
103
- */
105
+ /* *
106
+ * Check for standard transaction types
107
+ * @param[in] mapInputs Map of previous transactions that have outputs we're spending
108
+ * @param[in] taproot_active Whether or taproot consensus rules are active (used to decide whether spends of them are permitted)
109
+ * @return True if all inputs (scriptSigs) use only standard transaction forms
110
+ */
104
111
bool AreInputsStandard (const CTransaction& tx, const CCoinsViewCache& mapInputs, bool taproot_active);
105
- /* *
106
- * Check if the transaction is over standard P2WSH resources limit:
107
- * 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements
108
- * These limits are adequate for multisignatures up to n-of-100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL.
109
- *
110
- * Also enforce a maximum stack item size limit and no annexes for tapscript spends.
111
- */
112
+ /* *
113
+ * Check if the transaction is over standard P2WSH resources limit:
114
+ * 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements
115
+ * These limits are adequate for multisignatures up to n-of-100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL.
116
+ *
117
+ * Also enforce a maximum stack item size limit and no annexes for tapscript spends.
118
+ */
112
119
bool IsWitnessStandard (const CTransaction& tx, const CCoinsViewCache& mapInputs);
113
120
114
121
/* * Compute the virtual transaction size (weight reinterpreted as bytes). */
0 commit comments