aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-tx.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-12-10 11:21:33 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-12-10 11:12:08 +0100
commitfade6195b1c230edd561443637a7bde81c2594a4 (patch)
treeddf3818f5417e5e1d381a08d8ba1eb53f4fa1172 /src/bitcoin-tx.cpp
parent38176dc66523881d45705fe8f96b9da76ec9981b (diff)
downloadbitcoin-fade6195b1c230edd561443637a7bde81c2594a4.tar.xz
Move TX_MAX_STANDARD_VERSION to policy
Also remove extraneous whitespace, should be reviewed with --ignore-all-space
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r--src/bitcoin-tx.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index f87b9c1d16..321d62fe4d 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -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;
}