aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2012-09-08 17:33:10 +0200
committerPieter Wuille <[email protected]>2013-01-08 01:49:14 +0100
commitf1136200a67fc1df894d45fba51b40f748e0b889 (patch)
tree1c867524f6e9864f17024b817b68cbe8be78adf4 /src/main.cpp
parentMerge pull request #2153 from Diapolo/overviewpage (diff)
downloaddiscoin-f1136200a67fc1df894d45fba51b40f748e0b889.tar.xz
discoin-f1136200a67fc1df894d45fba51b40f748e0b889.zip
Move VerifySignature to main
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 28fbc8b45..c0446370a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1348,6 +1348,17 @@ bool CTransaction::HaveInputs(CCoinsViewCache &inputs) const
return true;
}
+bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
+{
+ assert(nIn < txTo.vin.size());
+ const CTxIn& txin = txTo.vin[nIn];
+ if (txin.prevout.n >= txFrom.vout.size())
+ return false;
+ const CTxOut& txout = txFrom.vout[txin.prevout.n];
+
+ return VerifyScript(txin.scriptSig, txout.scriptPubKey, txTo, nIn, flags, nHashType);
+}
+
bool CTransaction::CheckInputs(CCoinsViewCache &inputs, enum CheckSig_mode csmode, unsigned int flags) const
{
if (!IsCoinBase())