This commit is contained in:
jl777
2018-07-23 04:43:21 -11:00
parent 0f4afd4d46
commit 46d1074a67
4 changed files with 12 additions and 3 deletions

View File

@@ -121,7 +121,11 @@ std::string FinalizeCCTx(uint8_t evalcode,CMutableTransaction &mtx,CPubKey mypk,
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++)
int32_t z;
for (z=0; z<32; z++)
fprintf(stderr,"%02x",((uint8_t *)sighash.begin())[z]);
fprintf(stderr," sighash, ");
for (z=0; z<32; z++)
fprintf(stderr,"%02x",privkey[z]);
fprintf(stderr," signed with privkey\n");
mtx.vin[i].scriptSig = CCSig(cond);

View File

@@ -35,7 +35,7 @@ bool RunCCEval(const CC *cond, const CTransaction &tx, unsigned int nIn)
EvalRef eval;
bool out = eval->Dispatch(cond, tx, nIn);
//fprintf(stderr,"out %d vs %d isValid\n",(int32_t)out,(int32_t)eval->state.IsValid());
fprintf(stderr,"out %d vs %d isValid\n",(int32_t)out,(int32_t)eval->state.IsValid());
assert(eval->state.IsValid() == out);
if (eval->state.IsValid()) return true;