| 111 | |
| 112 | |
| 113 | int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, |
| 114 | const unsigned char *txTo , unsigned int txToLen, |
| 115 | unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err) |
| 116 | { |
| 117 | if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) { |
| 118 | return set_error(err, bitcoinconsensus_ERR_AMOUNT_REQUIRED); |
| 119 | } |
| 120 | |
| 121 | CAmount am(0); |
| 122 | return ::verify_script(scriptPubKey, scriptPubKeyLen, am, txTo, txToLen, nIn, flags, err); |
| 123 | } |
| 124 | |
| 125 | unsigned int bitcoinconsensus_version() |
| 126 | { |