mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-03-13 06:01:45 +00:00
OK, it was decided that MAX_SCRIPT_ELEMENT_SIZE shall be 3072.
This commit is contained in:
parent
45fed9568c
commit
e30e56ef11
@ -2798,7 +2798,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
||||
std::vector<unsigned char> 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) {
|
||||
|
@ -99,7 +99,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
|
||||
for (const CTxIn& txin : tx.vin)
|
||||
{
|
||||
// Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
|
||||
// keys (remember the 520 byte limit on redeemScript size). That works
|
||||
// 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 bytes for some minor
|
||||
// future-proofing. That's also enough to spend a 20-of-20
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <vector>
|
||||
|
||||
// Maximum number of bytes pushable to the stack
|
||||
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520;
|
||||
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 3072;
|
||||
|
||||
// Maximum number of non-push operations per script
|
||||
static const int MAX_OPS_PER_SCRIPT = 201;
|
||||
|
@ -4352,7 +4352,7 @@ std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key)
|
||||
|
||||
CTxDestination CWallet::AddAndGetDestinationForScript(const CScript& script, OutputType type)
|
||||
{
|
||||
// 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 OUTPUT_TYPE_LEGACY:
|
||||
return CScriptID(script);
|
||||
|
Loading…
x
Reference in New Issue
Block a user