aboutsummaryrefslogtreecommitdiff
path: root/src/policy/policy.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-07-05 18:34:54 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-07-05 18:40:58 +0200
commit062738cf69a27192ecb9014f79a8a9b5cbd06a7d (patch)
treef00d9b7d57fe4fa3444448bdc357cfebfec42fb8 /src/policy/policy.cpp
parentc9eb8d1c5503dc87fcc4f67228a73c095ebd271f (diff)
parent2f1a30c63e421b191c62059132b1cd40c24bd4d5 (diff)
Merge #13096: [Policy] Fix MAX_STANDARD_TX_WEIGHT check
2f1a30c63 Fix MAX_STANDARD_TX_WEIGHT check (Johnson Lau) Pull request description: As suggested by the constant name and its comment in policy.h, a transaction with a weight of exactly MAX_STANDARD_TX_WEIGHT should be allowed. Users could be confused. Tree-SHA512: af417de1c6a2e6796ebbb39aa0caad8764302ded155cb1bbfbe457e4567c199cc53256189832b17d4aeec369e190b3edd4c6116d5f0b8cf0ede6dfb4ed83bdd3
Diffstat (limited to 'src/policy/policy.cpp')
-rw-r--r--src/policy/policy.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index aac3fe5c14..3a592e40d3 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -88,7 +88,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason)
// computing signature hashes is O(ninputs*txsize). Limiting transactions
// to MAX_STANDARD_TX_WEIGHT mitigates CPU exhaustion attacks.
unsigned int sz = GetTransactionWeight(tx);
- if (sz >= MAX_STANDARD_TX_WEIGHT) {
+ if (sz > MAX_STANDARD_TX_WEIGHT) {
reason = "tx-size";
return false;
}