aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index a0b6842e7e..63b87b8d1b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -513,10 +513,14 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
BOOST_FOREACH(const CTxIn& txin, tx.vin)
{
- // Biggest 'standard' txin is a 3-signature 3-of-3 CHECKMULTISIG
- // pay-to-script-hash, which is 3 ~80-byte signatures, 3
- // ~65-byte public keys, plus a few script ops.
- if (txin.scriptSig.size() > 500) {
+ // Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
+ // keys. (remember the 520 byte limit on redeemScript size) That works
+ // out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)=1624
+ // 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
+ // CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not
+ // considered standard)
+ if (txin.scriptSig.size() > 1650) {
reason = "scriptsig-size";
return false;
}