Gavin's TEST network as -testnet switch, misc fixes

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@168 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
s_nakamoto
2010-10-19 17:16:51 +00:00
parent 2fad3d34b7
commit 5cbf75324d
14 changed files with 155 additions and 82 deletions

View File

@@ -776,16 +776,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
return false;
int nKeysCount = CastToBigNum(stacktop(-i)).getint();
if (nKeysCount < 0)
if (nKeysCount < 0 || nKeysCount > 20)
return false;
nOpCount += nKeysCount;
if (nOpCount > 201)
return false;
if (nBestHeight > 84000)
{
if (nKeysCount > 20)
return false;
nOpCount += nKeysCount;
if (nOpCount > 201)
return false;
}
int ikey = ++i;
i += nKeysCount;
if (stack.size() < i)