From 1904b96d92da7fd9541eb57df5be2cc247707d62 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Jul 2019 22:54:25 -1100 Subject: [PATCH] Sighs --- src/cc/CCtx.cpp | 8 ++++---- src/cryptoconditions/src/cryptoconditions.c | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index c29856d1c..1351cdffb 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -280,10 +280,10 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran uint256 sighash = SignatureHash(CCPubKey(cond), mtx, i, SIGHASH_ALL, utxovalues[i],consensusBranchId, &txdata); if ( cc_signTreeSecp256k1Msg32(cond,privkey,sighash.begin()) != 0 ) { - //int32_t z; - //for (z=0; z<32; z++) - // fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]); - //fprintf(stderr," sighash, "); + int32_t z; + for (z=0; z<32; z++) + fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]); + fprintf(stderr," sighash\n"); //for (z=0; z<32; z++) // fprintf(stderr,"%02x",privkey[z]); //fprintf(stderr," signed with privkey\n"); diff --git a/src/cryptoconditions/src/cryptoconditions.c b/src/cryptoconditions/src/cryptoconditions.c index 3763c867b..1aae52c9b 100644 --- a/src/cryptoconditions/src/cryptoconditions.c +++ b/src/cryptoconditions/src/cryptoconditions.c @@ -274,7 +274,10 @@ int cc_verify(const struct CC *cond, const unsigned char *msg, size_t msgLength, else memcpy(msgHash, msg, 32); if (!cc_secp256k1VerifyTreeMsg32(cond, msgHash)) { - fprintf(stderr,"cc_verify error C msgHash.%s\n",msgHash.GetHex().c_str()); + int32_t z; + for (z=0; z<32; z++) + fprintf(stderr,"%02x",msgHash[z]); + fprintf(stderr," msgHash, cc_verify error C\n"); return 0; }