X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fscript.cpp;h=a3ab8e139d931b4b786281d6a9dd79aeff407ab6;hb=0561bbd1c69263dceb24ffacf850788e6e961a13;hp=56c2e500d08a6b2bb81f68caacd2ce4e1b2ba58a;hpb=fcbeaff8d049e414284631989b950e56b909525c;p=novacoin.git diff --git a/src/script.cpp b/src/script.cpp index 56c2e50..a3ab8e1 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1,7 +1,8 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers +// Copyright (c) 2012 The PPCoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include @@ -19,7 +20,6 @@ bool CheckSig(vector vchSig, vector vchPubKey, CSc -typedef vector valtype; static const valtype vchFalse(0); static const valtype vchZero(0); static const valtype vchTrue(1, 1); @@ -1584,6 +1584,7 @@ bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTrans assert(nIn < txTo.vin.size()); CTxIn& txin = txTo.vin[nIn]; assert(txin.prevout.n < txFrom.vout.size()); + assert(txin.prevout.hash == txFrom.GetHash()); const CTxOut& txout = txFrom.vout[txin.prevout.n]; // Leave out the signature from the hash, since a signature can't sign itself.