rpc: Add transaction min standard version parameter

This commit is contained in:
Bue-von-hon authored and ishaanam committed 2025-08-15 11:05:31 -04:00
1 parent c5a2d08011
commit 4c20343b4d
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ bool IsStandard(const CScript& scriptPubKey, TxoutType& whichType)
bool IsStandardTx(const CTransaction& tx, const std::optional<unsigned>& max_datacarrier_bytes, bool permit_bare_multisig, const CFeeRate& dust_relay_fee, std::string& reason)
{
if (tx.version > TX_MAX_STANDARD_VERSION || tx.version < 1) {
if (tx.version > TX_MAX_STANDARD_VERSION || tx.version < TX_MIN_STANDARD_VERSION) {
reason = "version";
return false;
}
+1
View File
@@ -145,6 +145,7 @@ std::vector<uint32_t> GetDust(const CTransaction& tx, CFeeRate dust_relay_rate);
// Changing the default transaction version requires a two step process: first
// adapting relay policy by bumping TX_MAX_STANDARD_VERSION, and then later
// allowing the new transaction version in the wallet/RPC.
static constexpr decltype(CTransaction::version) TX_MIN_STANDARD_VERSION{1};
static constexpr decltype(CTransaction::version) TX_MAX_STANDARD_VERSION{3};
/**