Browse Source

Sighs

warmup
jl777 5 years ago
parent
commit
1904b96d92
  1. 8
      src/cc/CCtx.cpp
  2. 5
      src/cryptoconditions/src/cryptoconditions.c

8
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");

5
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;
}

Loading…
Cancel
Save