This commit is contained in:
@@ -952,7 +952,7 @@ bool EvalScript(
|
||||
|
||||
if (stack.size() < 2)
|
||||
return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
|
||||
|
||||
fprintf(stderr,"check cryptocondition\n");
|
||||
int fResult = checker.CheckCryptoCondition(stacktop(-1), stacktop(-2), script, consensusBranchId);
|
||||
if (fResult == -1) {
|
||||
return set_error(serror, SCRIPT_ERR_CRYPTOCONDITION_INVALID_FULFILLMENT);
|
||||
@@ -1313,14 +1313,14 @@ int TransactionSignatureChecker::CheckCryptoCondition(
|
||||
} catch (logic_error ex) {
|
||||
return 0;
|
||||
}
|
||||
//int32_t z; uint8_t *ptr;
|
||||
//ptr = (uint8_t *)scriptCode.data();
|
||||
//for (z=0; z<scriptCode.size(); z++)
|
||||
// fprintf(stderr,"%02x",ptr[z]);
|
||||
//fprintf(stderr," <- CScript\n");
|
||||
//for (z=0; z<32; z++)
|
||||
// fprintf(stderr,"%02x",((uint8_t *)&sighash)[z]);
|
||||
//fprintf(stderr," sighash nIn.%d nHashType.%d %.8f id.%d\n",(int32_t)nIn,(int32_t)nHashType,(double)amount/COIN,(int32_t)consensusBranchId);
|
||||
int32_t z; uint8_t *ptr;
|
||||
ptr = (uint8_t *)scriptCode.data();
|
||||
for (z=0; z<scriptCode.size(); z++)
|
||||
fprintf(stderr,"%02x",ptr[z]);
|
||||
fprintf(stderr," <- CScript\n");
|
||||
for (z=0; z<32; z++)
|
||||
fprintf(stderr,"%02x",((uint8_t *)&sighash)[z]);
|
||||
fprintf(stderr," sighash nIn.%d nHashType.%d %.8f id.%d\n",(int32_t)nIn,(int32_t)nHashType,(double)amount/COIN,(int32_t)consensusBranchId);
|
||||
|
||||
VerifyEval eval = [] (CC *cond, void *checker) {
|
||||
return ((TransactionSignatureChecker*)checker)->CheckEvalCondition(cond);
|
||||
@@ -1328,7 +1328,7 @@ int TransactionSignatureChecker::CheckCryptoCondition(
|
||||
|
||||
int out = cc_verify(cond, (const unsigned char*)&sighash, 32, 0,
|
||||
condBin.data(), condBin.size(), eval, (void*)this);
|
||||
//fprintf(stderr,"out.%d from cc_verify\n",(int32_t)out);
|
||||
fprintf(stderr,"out.%d from cc_verify\n",(int32_t)out);
|
||||
cc_free(cond);
|
||||
return out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user