MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CScriptCheck

Class CScriptCheck

src/validation.h:338–359  ·  view source on GitHub ↗

* Closure representing one script verification * Note that this stores references to the spending transaction */

Source from the content-addressed store, hash-verified

336 * Note that this stores references to the spending transaction
337 */
338class CScriptCheck
339{
340private:
341 CTxOut m_tx_out;
342 const CTransaction *ptxTo;
343 unsigned int nIn;
344 script_verify_flags m_flags;
345 bool cacheStore;
346 PrecomputedTransactionData *txdata;
347 SignatureCache* m_signature_cache;
348
349public:
350 CScriptCheck(const CTxOut& outIn, const CTransaction& txToIn, SignatureCache& signature_cache, unsigned int nInIn, script_verify_flags flags, bool cacheIn, PrecomputedTransactionData* txdataIn) :
351 m_tx_out(outIn), ptxTo(&txToIn), nIn(nInIn), m_flags(flags), cacheStore(cacheIn), txdata(txdataIn), m_signature_cache(&signature_cache) { }
352
353 CScriptCheck(const CScriptCheck&) = delete;
354 CScriptCheck& operator=(const CScriptCheck&) = delete;
355 CScriptCheck(CScriptCheck&&) = default;
356 CScriptCheck& operator=(CScriptCheck&&) = default;
357
358 std::optional<std::pair<ScriptError, std::string>> operator()();
359};
360
361// CScriptCheck is used a lot in std::vector, make sure that's efficient
362static_assert(std::is_nothrow_move_assignable_v<CScriptCheck>);

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68