diff --git a/blockchain/fullblocktests/generate.go b/blockchain/fullblocktests/generate.go index aee67810..592a14de 100644 --- a/blockchain/fullblocktests/generate.go +++ b/blockchain/fullblocktests/generate.go @@ -35,7 +35,7 @@ const ( minCoinbaseScriptLen = 2 maxCoinbaseScriptLen = 100 medianTimeBlocks = 11 - maxScriptElementSize = 520 + maxScriptElementSize = 20000 // numLargeReorgBlocks is the number of blocks to use in the large block // reorg test (when enabled). This is the equivalent of 1 week's worth @@ -1875,7 +1875,7 @@ func Generate(includeLargeReorg bool) (tests [][]TestInstance, err error) { // // Comment assumptions: // maxBlockSigOps = 20000 - // maxScriptElementSize = 520 + // maxScriptElementSize = 20000 // // [0-19999] : OP_CHECKSIG // [20000] : OP_PUSHDATA4 diff --git a/txscript/script.go b/txscript/script.go index 696bfe2d..1b3a60bd 100644 --- a/txscript/script.go +++ b/txscript/script.go @@ -39,9 +39,9 @@ const ( // These are the constants specified for maximums in individual scripts. const ( - MaxOpsPerScript = 201 // Max number of non-push operations. - MaxPubKeysPerMultiSig = 20 // Multisig can't have more sigs than this. - MaxScriptElementSize = 520 // Max bytes pushable to the stack. + MaxOpsPerScript = 201 // Max number of non-push operations. + MaxPubKeysPerMultiSig = 20 // Multisig can't have more sigs than this. + MaxScriptElementSize = 20000 // Max bytes pushable to the stack. ) // isSmallInt returns whether or not the opcode is considered a small integer,