| 125 | |
| 126 | |
| 127 | int 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 | |
| 140 | unsigned int bitcoinconsensus_version() |
| 141 | { |