diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 022db7c81..1942e3b7c 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -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); diff --git a/src/cc/eval.cpp b/src/cc/eval.cpp index 97bb89402..3f70b6466 100644 --- a/src/cc/eval.cpp +++ b/src/cc/eval.cpp @@ -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; diff --git a/src/main.cpp b/src/main.cpp index 632b59e64..cef87892e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1365,7 +1365,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa // do we already have it? if (view.HaveCoins(hash)) { - fprintf(stderr,"view.HaveCoins(hash) error\n"); + //fprintf(stderr,"view.HaveCoins(hash) error\n"); return state.Invalid(false, REJECT_DUPLICATE, "already have coins"); } diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 4a2eac2bc..9ac4981bc 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1313,6 +1313,10 @@ int TransactionSignatureChecker::CheckCryptoCondition( } catch (logic_error ex) { return 0; } + int32_t z; + for (z=0; z<32; z++) + fprintf(stderr,"%02x",((uint8_t *)&sighash)[z]); + fprintf(stderr," sighash\n"); VerifyEval eval = [] (CC *cond, void *checker) { return ((TransactionSignatureChecker*)checker)->CheckEvalCondition(cond); @@ -1320,6 +1324,7 @@ int TransactionSignatureChecker::CheckCryptoCondition( int out = cc_verify(cond, (const unsigned char*)&sighash, 32, 0, condBin.data(), condBin.size(), eval, (void*)this); + fprintf(stderr,"out.%d from cc_verify\n",(int32_t)out); cc_free(cond); return out; }