mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
Move TX_MAX_STANDARD_VERSION to policy
Also remove extraneous whitespace, should be reviewed with --ignore-all-space
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include <consensus/consensus.h>
|
||||
#include <core_io.h>
|
||||
#include <key_io.h>
|
||||
#include <policy/policy.h>
|
||||
#include <policy/rbf.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
@ -196,8 +197,9 @@ static CAmount ExtractAndValidateValue(const std::string& strValue)
|
||||
static void MutateTxVersion(CMutableTransaction& tx, const std::string& cmdVal)
|
||||
{
|
||||
int64_t newVersion;
|
||||
if (!ParseInt64(cmdVal, &newVersion) || newVersion < 1 || newVersion > CTransaction::MAX_STANDARD_VERSION)
|
||||
if (!ParseInt64(cmdVal, &newVersion) || newVersion < 1 || newVersion > TX_MAX_STANDARD_VERSION) {
|
||||
throw std::runtime_error("Invalid TX version requested: '" + cmdVal + "'");
|
||||
}
|
||||
|
||||
tx.nVersion = (int) newVersion;
|
||||
}
|
||||
|
Reference in New Issue
Block a user