aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/validation.h b/src/validation.h
index d0f6cdc135..69751b8c68 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -355,8 +355,7 @@ bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp = null
class CScriptCheck
{
private:
- CScript scriptPubKey;
- CAmount amount;
+ CTxOut out;
const CTransaction *ptxTo;
unsigned int nIn;
unsigned int nFlags;
@@ -365,17 +364,15 @@ private:
PrecomputedTransactionData *txdata;
public:
- CScriptCheck(): amount(0), ptxTo(nullptr), nIn(0), nFlags(0), cacheStore(false), error(SCRIPT_ERR_UNKNOWN_ERROR) {}
- CScriptCheck(const CScript& scriptPubKeyIn, const CAmount amountIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn, PrecomputedTransactionData* txdataIn) :
- scriptPubKey(scriptPubKeyIn), amount(amountIn),
- ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR), txdata(txdataIn) { }
+ CScriptCheck(): ptxTo(nullptr), nIn(0), nFlags(0), cacheStore(false), error(SCRIPT_ERR_UNKNOWN_ERROR) {}
+ CScriptCheck(const CTxOut& outIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn, PrecomputedTransactionData* txdataIn) :
+ out(outIn), ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR), txdata(txdataIn) { }
bool operator()();
void swap(CScriptCheck &check) {
- scriptPubKey.swap(check.scriptPubKey);
std::swap(ptxTo, check.ptxTo);
- std::swap(amount, check.amount);
+ std::swap(out, check.out);
std::swap(nIn, check.nIn);
std::swap(nFlags, check.nFlags);
std::swap(cacheStore, check.cacheStore);