Destroys the check in the case of no queue, or passes its ownership to the queue.
| 79 | |
| 80 | // Destroys the check in the case of no queue, or passes its ownership to the queue. |
| 81 | ScriptError QueueCheck(std::vector<CCheck*>* queue, CCheck* check) { |
| 82 | if (queue != NULL) { |
| 83 | queue->push_back(check); |
| 84 | return SCRIPT_ERR_OK; |
| 85 | } |
| 86 | bool success = (*check)(); |
| 87 | ScriptError err = check->GetScriptError(); |
| 88 | delete check; |
| 89 | return success ? SCRIPT_ERR_OK : err; |
| 90 | } |
| 91 | |
| 92 | // Helper function for VerifyAmount(), not exported |
| 93 | static bool VerifyIssuanceAmount(secp256k1_pedersen_commitment& value_commit, secp256k1_generator& asset_gen, |
no test coverage detected