From 11aa04e7eca6aa44f1b6673fbd19606532a570cd Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Sun, 6 Jun 2021 12:29:23 +0300 Subject: [PATCH] Bump MIN_STANDARD_TX_SIZE to 85 bytes --- src/policy/policy.h | 4 ++-- src/validation.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/policy/policy.h b/src/policy/policy.h index 8220490de6..3a8764d408 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -22,8 +22,8 @@ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 2000000; static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000; /** The maximum size for transactions we're willing to relay/mine */ static const unsigned int MAX_STANDARD_TX_SIZE = 100000; -/** The minimum size for transactions we're willing to relay/mine (1 input + 1 P2PKH output = 82 bytes) */ -static const unsigned int MIN_STANDARD_TX_SIZE = 82; +/** The minimum size for transactions we're willing to relay/mine (1 empty scriptSig input + 1 P2PKH output = 85 bytes) */ +static const unsigned int MIN_STANDARD_TX_SIZE = 85; /** Maximum number of signature check operations in an IsStandard() P2SH script */ static const unsigned int MAX_P2SH_SIGOPS = 15; /** The maximum number of sigops we're willing to relay/mine in a single tx */ diff --git a/src/validation.cpp b/src/validation.cpp index 995acc2de6..8bbbdeefc4 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -665,7 +665,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool return state.DoS(0, false, REJECT_NONSTANDARD, reason); // Do not work on transactions that are too small. - // A transaction with 1 input and 1 P2PKH output has size of 82 bytes. + // A transaction with 1 empty scriptSig input and 1 P2PKH output has size of 85 bytes. // Transactions smaller than this are not relayed to reduce unnecessary malloc overhead. if (::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) < MIN_STANDARD_TX_SIZE) return state.DoS(0, false, REJECT_NONSTANDARD, "tx-size-small");