This commit is contained in:
@@ -232,12 +232,15 @@ int cc_verify(const struct CC *cond, const unsigned char *msg, size_t msgLength,
|
|||||||
const unsigned char *condBin, size_t condBinLength,
|
const unsigned char *condBin, size_t condBinLength,
|
||||||
VerifyEval verifyEval, void *evalContext) {
|
VerifyEval verifyEval, void *evalContext) {
|
||||||
unsigned char targetBinary[1000];
|
unsigned char targetBinary[1000];
|
||||||
|
fprintf(stderr,"in cc_verify cond.%p msg.%p[%d] dohash.%d condbin.%p[%d]\n",cond,msg,(int32_t)msgLength,doHashMsg,condBin,(int32_t)condBinLength);
|
||||||
const size_t binLength = cc_conditionBinary(cond, targetBinary);
|
const size_t binLength = cc_conditionBinary(cond, targetBinary);
|
||||||
if (0 != memcmp(condBin, targetBinary, binLength)) {
|
if (0 != memcmp(condBin, targetBinary, binLength)) {
|
||||||
|
fprintf(stderr,"cc_verify error A\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cc_ed25519VerifyTree(cond, msg, msgLength)) {
|
if (!cc_ed25519VerifyTree(cond, msg, msgLength)) {
|
||||||
|
fprintf(stderr,"cc_verify error B\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,10 +249,12 @@ int cc_verify(const struct CC *cond, const unsigned char *msg, size_t msgLength,
|
|||||||
else memcpy(msgHash, msg, 32);
|
else memcpy(msgHash, msg, 32);
|
||||||
|
|
||||||
if (!cc_secp256k1VerifyTreeMsg32(cond, msgHash)) {
|
if (!cc_secp256k1VerifyTreeMsg32(cond, msgHash)) {
|
||||||
|
fprintf(stderr,"cc_verify error C\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!cc_verifyEval(cond, verifyEval, evalContext)) {
|
if (!cc_verifyEval(cond, verifyEval, evalContext)) {
|
||||||
|
fprintf(stderr,"cc_verify error D\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -1326,7 +1326,7 @@ int TransactionSignatureChecker::CheckCryptoCondition(
|
|||||||
fprintf(stderr,"checker.%p\n",(TransactionSignatureChecker*)checker);
|
fprintf(stderr,"checker.%p\n",(TransactionSignatureChecker*)checker);
|
||||||
return ((TransactionSignatureChecker*)checker)->CheckEvalCondition(cond);
|
return ((TransactionSignatureChecker*)checker)->CheckEvalCondition(cond);
|
||||||
};
|
};
|
||||||
|
fprintf(stderr,"non-checker path\n");
|
||||||
int out = cc_verify(cond, (const unsigned char*)&sighash, 32, 0,
|
int out = cc_verify(cond, (const unsigned char*)&sighash, 32, 0,
|
||||||
condBin.data(), condBin.size(), eval, (void*)this);
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user