auxiliary cryptoconditions

This commit is contained in:
Scott Sadler
2018-02-06 18:37:08 -03:00
parent 63d3e4aab1
commit 6e821110fd
3 changed files with 12 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
/*
* Method stub for aux conditions. Unimplemented, thus fails if an aux condition is encountered.
*/
int komodoCCAux(CC *cond, void *context) {
return 0;
}

View File

@@ -14,6 +14,7 @@
#include "script/script.h"
#include "uint256.h"
#include "cryptoconditions/include/cryptoconditions.h"
#include "komodo_cryptoconditions.h"
using namespace std;
@@ -963,8 +964,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
// TODO: Should nHashType be hardcoded?
// Other types use the last byte of the signature
char *msg = (char*) checker.GetMessage(script, SIGHASH_ALL).begin();
;
bool fSuccess = cc_verify(cond, msg, 32, condBin, vchCondition.size());
bool fSuccess = cc_verify(cond, msg, 32, condBin, vchCondition.size(), komodoCCAux, NULL);
popstack(stack);
popstack(stack);