From 37a9a0b8a8e2a88d01a6c1a40903605e9b8aa83b Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 13 Jul 2019 07:49:00 -1100 Subject: [PATCH] -print --- src/cc/CCtx.cpp | 17 ++++++++++------- src/cc/faucet.cpp | 4 ++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 64fadd63f..3afe682c4 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -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); diff --git a/src/cc/faucet.cpp b/src/cc/faucet.cpp index b1dd579f1..e2fc360a8 100644 --- a/src/cc/faucet.cpp +++ b/src/cc/faucet.cpp @@ -158,11 +158,11 @@ int64_t AddFaucetInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPub vout = (int32_t)it->first.index; if ( it->second.satoshis < threshold ) continue; - char str[65]; fprintf(stderr,"check %s/v%d %.8f`\n",uint256_str(str,txid),vout,(double)it->second.satoshis/COIN); + //char str[65]; fprintf(stderr,"check %s/v%d %.8f`\n",uint256_str(str,txid),vout,(double)it->second.satoshis/COIN); // no need to prevent dup if ( myGetTransaction(txid,vintx,hashBlock) != 0 ) { - if ( KOMODO_NSPV != 0 || ((nValue= IsFaucetvout(cp,vintx,vout)) > 1000000 && myIsutxo_spentinmempool(ignoretxid,ignorevin,txid,vout) == 0) ) + if ( (nValue= IsFaucetvout(cp,vintx,vout)) > 1000000 && myIsutxo_spentinmempool(ignoretxid,ignorevin,txid,vout) == 0 ) { if ( total != 0 && maxinputs != 0 ) mtx.vin.push_back(CTxIn(txid,vout,CScript()));