aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@xbt.hk>2018-04-27 01:24:48 +0800
committerJohnson Lau <jl2012@xbt.hk>2018-05-05 00:00:28 +0800
commit2f1a30c63e421b191c62059132b1cd40c24bd4d5 (patch)
tree38c1f3ddbfb92a907290769220556ecc2c200054 /src/net_processing.cpp
parent627c3762ce5d8ce097f70c7fb52a3640246fae9b (diff)
downloadbitcoin-2f1a30c63e421b191c62059132b1cd40c24bd4d5.tar.xz
Fix MAX_STANDARD_TX_WEIGHT check
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
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index cc819a01c3..1d09bdc3be 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -664,10 +664,10 @@ bool AddOrphanTx(const CTransactionRef& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRE
// large transaction with a missing parent then we assume
// it will rebroadcast it later, after the parent transaction(s)
// have been mined or received.
- // 100 orphans, each of which is at most 99,999 bytes big is
+ // 100 orphans, each of which is at most 100,000 bytes big is
// at most 10 megabytes of orphans and somewhat more byprev index (in the worst case):
unsigned int sz = GetTransactionWeight(*tx);
- if (sz >= MAX_STANDARD_TX_WEIGHT)
+ if (sz > MAX_STANDARD_TX_WEIGHT)
{
LogPrint(BCLog::MEMPOOL, "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString());
return false;