aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-09-09 12:00:27 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-09-09 12:00:46 +0200
commit32269449185d64d96900a503e73439060dae19f2 (patch)
tree861f93ead65ebe327b08cade32222496a7d1664a /src/main.h
parent122fdfdae91542152e40359f99245ed589010b3b (diff)
parentab295bb4be26939e4853b9d95a9938c5ed8afa57 (diff)
downloadbitcoin-32269449185d64d96900a503e73439060dae19f2.tar.xz
Merge #8679: [0.13] Various backports
ab295bb Do not add random inbound peers to addrman. (Gregory Maxwell) bbf379b Fix some locks (Pieter Wuille) 2215c22 Check for compatibility with download in FindNextBlocksToDownload (Pieter Wuille) b8c79a0 Precompute sighashes (Pieter Wuille) a987431 [util] CopyrightHolders: Check for untranslated substitution (MarcoFalke) 32d75a7 doc: Update build-openbsd for 0.13.0+ and OpenBSD 5.9 (Wladimir J. van der Laan) b09e13c build: Updates for OpenBSD (Wladimir J. van der Laan) 0e6d753 [doc] build: Mention curl (MarcoFalke) f1c0d78 [Qt] show network/chain errors in the GUI (Jonas Schnelli) 2611ad7 Added feeler connections increasing good addrs in the tried table. (Ethan Heilman) 1db3352 qt: Fix random segfault when closing "Choose data directory" dialog (Wladimir J. van der Laan) 75f2065 build: Remove check for `openssl/ec.h` (Wladimir J. van der Laan)
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.h b/src/main.h
index 631dc00d05..cbce34290a 100644
--- a/src/main.h
+++ b/src/main.h
@@ -39,6 +39,7 @@ class CTxMemPool;
class CValidationInterface;
class CValidationState;
+struct PrecomputedTransactionData;
struct CNodeStateStats;
struct LockPoints;
@@ -347,7 +348,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
* instead of being performed inline.
*/
bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks,
- unsigned int flags, bool cacheStore, std::vector<CScriptCheck> *pvChecks = NULL);
+ unsigned int flags, bool cacheStore, PrecomputedTransactionData& txdata, std::vector<CScriptCheck> *pvChecks = NULL);
/** Apply the effects of this transaction on the UTXO set represented by view */
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight);
@@ -408,12 +409,13 @@ private:
unsigned int nFlags;
bool cacheStore;
ScriptError error;
+ PrecomputedTransactionData *txdata;
public:
CScriptCheck(): amount(0), ptxTo(0), nIn(0), nFlags(0), cacheStore(false), error(SCRIPT_ERR_UNKNOWN_ERROR) {}
- CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn) :
+ CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn, PrecomputedTransactionData* txdataIn) :
scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey), amount(txFromIn.vout[txToIn.vin[nInIn].prevout.n].nValue),
- ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR) { }
+ ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR), txdata(txdataIn) { }
bool operator()();
@@ -425,6 +427,7 @@ public:
std::swap(nFlags, check.nFlags);
std::swap(cacheStore, check.cacheStore);
std::swap(error, check.error);
+ std::swap(txdata, check.txdata);
}
ScriptError GetScriptError() const { return error; }