MCPcopy Create free account
hub / github.com/ElementsProject/elements / bitcoinconsensus_verify_script

Function bitcoinconsensus_verify_script

src/script/bitcoinconsensus.cpp:127–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125
126
127int bitcoinconsensus_verify_script(const unsigned char *hash_genesis_block,
128 const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
129 const unsigned char *txTo , unsigned int txToLen,
130 unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
131{
132 if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
133 return set_error(err, bitcoinconsensus_ERR_AMOUNT_REQUIRED);
134 }
135
136 CConfidentialValue am(0);
137 return ::verify_script(hash_genesis_block, scriptPubKey, scriptPubKeyLen, am, txTo, txToLen, nIn, flags, err);
138}
139
140unsigned int bitcoinconsensus_version()
141{

Callers 3

DoTestFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
FUZZ_TARGETFunction · 0.85

Calls 2

verify_scriptFunction · 0.85
set_errorFunction · 0.70

Tested by 3

DoTestFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
FUZZ_TARGETFunction · 0.68