mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Move VerifySignature to main
This commit is contained in:
parent
429915bd0d
commit
f1136200a6
4 changed files with 14 additions and 14 deletions
11
src/main.cpp
11
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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue