This commit is contained in:
jl777
2019-07-13 07:49:00 -11:00
parent 575b65ab10
commit 37a9a0b8a8
2 changed files with 12 additions and 9 deletions

View File

@@ -284,13 +284,16 @@ std::string FinalizeCCTx(uint64_t CCmask,struct CCcontract_info *cp,CMutableTran
}
}
uint256 sighash = SignatureHash(CCPubKey(cond), mtx, i, SIGHASH_ALL,utxovalues[i],consensusBranchId, &txdata);
int32_t z;
for (z=0; z<32; z++)
fprintf(stderr,"%02x",privkey[z]);
fprintf(stderr," privkey, ");
for (z=0; z<32; z++)
fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]);
fprintf(stderr," sighash [%d] %.8f %x\n",i,(double)utxovalues[i]/COIN,consensusBranchId);
if ( 0 )
{
int32_t z;
for (z=0; z<32; z++)
fprintf(stderr,"%02x",privkey[z]);
fprintf(stderr," privkey, ");
for (z=0; z<32; z++)
fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]);
fprintf(stderr," sighash [%d] %.8f %x\n",i,(double)utxovalues[i]/COIN,consensusBranchId);
}
if ( cc_signTreeSecp256k1Msg32(cond,privkey,sighash.begin()) != 0 )
{
mtx.vin[i].scriptSig = CCSig(cond);