From 69599ecf22ab6ed50801c6641dd17cd4c24e3e39 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sat, 10 Jan 2015 10:17:03 +0000 Subject: [PATCH] Increase IsStandard() scriptSig length See #107 for additional info. --- src/main.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7853aa3..0e22b11 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -309,10 +309,14 @@ bool CTransaction::IsStandard(string& strReason) const txnouttype whichType; BOOST_FOREACH(const CTxIn& txin, 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) { strReason = "scriptsig-size"; return false; -- 1.7.1