diff --git a/src/net_processing.cpp b/src/net_processing.cpp index da98e7f116..f164f71e63 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -5263,7 +5263,7 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type, std::vector vData; vRecv >> vData; - // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object, + // Nodes must NEVER send a data item > MAX_SCRIPT_ELEMENT_SIZE bytes (the max size for a script data object, // and thus, the maximum size any matched object can have) in a filteradd message bool bad = false; if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) { diff --git a/src/outputtype.cpp b/src/outputtype.cpp index 21235d82a1..60fa30879a 100644 --- a/src/outputtype.cpp +++ b/src/outputtype.cpp @@ -86,7 +86,7 @@ CTxDestination AddAndGetDestinationForScript(FillableSigningProvider& keystore, { // Add script to keystore keystore.AddCScript(script); - // Note that scripts over 520 bytes are not yet supported. + // Note that scripts over MAX_SCRIPT_ELEMENT_SIZE bytes are not yet supported. switch (type) { case OutputType::LEGACY: return ScriptHash(script); diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index 53ad5e954c..9686c7131a 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -128,7 +128,7 @@ bool IsStandardTx(const CTransaction& tx, const std::optional& max_dat for (const CTxIn& txin : tx.vin) { // Biggest 'standard' txin involving only keys is a 15-of-15 P2SH - // multisig with compressed keys (remember the 520 byte limit on + // multisig with compressed keys (remember the MAX_SCRIPT_ELEMENT_SIZE byte limit on // redeemScript size). That works out to a (15*(33+1))+3=513 byte // redeemScript, 513+1+15*(73+1)+3=1627 bytes of scriptSig, which // we round off to 1650(MAX_STANDARD_SCRIPTSIG_SIZE) bytes for diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index c21c6f3d30..8bf743630d 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -1082,7 +1082,7 @@ class SegWitTest(BitcoinTestFramework): @subtest def test_max_witness_push_length(self): - """Test that witness stack can only allow up to 520 byte pushes.""" + """Test that witness stack can only allow up to MAX_SCRIPT_ELEMENT_SIZE byte pushes.""" block = self.build_next_block()