MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Verify

Function Verify

src/test/script_p2sh_tests.cpp:29–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static bool
30Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict, ScriptError& err)
31{
32 // Create dummy to/from transactions:
33 CMutableTransaction txFrom;
34 txFrom.vout.resize(1);
35 txFrom.vout[0].scriptPubKey = scriptPubKey;
36
37 CMutableTransaction txTo;
38 txTo.vin.resize(1);
39 txTo.vout.resize(1);
40 txTo.vin[0].prevout.n = 0;
41 txTo.vin[0].prevout.hash = txFrom.GetHash();
42 txTo.vin[0].scriptSig = scriptSig;
43 txTo.vout[0].nValue = 1;
44
45 return VerifyScript(scriptSig, scriptPubKey, nullptr, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, MutableTransactionSignatureChecker(&txTo, 0, txFrom.vout[0].nValue), &err);
46}
47
48
49BOOST_FIXTURE_TEST_SUITE(script_p2sh_tests, BasicTestingSetup)

Callers 5

loadwalletFunction · 0.85
createwalletFunction · 0.85
VerifyMethod · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

VerifyScriptFunction · 0.85
resizeMethod · 0.45
GetHashMethod · 0.45

Tested by

no test coverage detected