| 85 | } |
| 86 | |
| 87 | void static RandomScript(CScript &script) { |
| 88 | static const opcodetype oplist[] = {OP_FALSE, OP_1, OP_2, OP_3, OP_CHECKSIG, OP_IF, OP_VERIF, OP_RETURN, OP_CODESEPARATOR}; |
| 89 | script = CScript(); |
| 90 | int ops = (insecure_rand() % 10); |
| 91 | for (int i=0; i<ops; i++) |
| 92 | script << oplist[insecure_rand() % (sizeof(oplist)/sizeof(oplist[0]))]; |
| 93 | } |
| 94 | |
| 95 | void static RandomTransaction(CMutableTransaction &tx, bool fSingle) { |
| 96 | tx.nVersion = insecure_rand(); |
no test coverage detected