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

Function RandomScript

src/test/sighash_tests.cpp:86–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void static RandomScript(CScript &script) {
87 static const opcodetype oplist[] = {OP_FALSE, OP_1, OP_2, OP_3, OP_CHECKSIG, OP_IF, OP_VERIF, OP_RETURN, OP_CODESEPARATOR};
88 script = CScript();
89 int ops = (InsecureRandRange(10));
90 for (int i=0; i<ops; i++)
91 script << oplist[InsecureRandRange(std::size(oplist))];
92}
93
94void static RandomTransaction(CMutableTransaction& tx, bool fSingle)
95{

Callers 2

RandomTransactionFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 3

InsecureRandRangeFunction · 0.85
CScriptClass · 0.50
sizeFunction · 0.50

Tested by

no test coverage detected