From ba30129fa6d93c71c93a4a065adfc485a85e1fcb Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 29 Jul 2018 04:27:59 -1100 Subject: [PATCH] Test --- src/cc/rewards.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index b4fcf737e..1d7c454a2 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -323,7 +323,7 @@ uint64_t RewardsPlanFunds(uint64_t refsbits,struct CCcontract_info *cp,CPubKey p if ( refsbits == sbits && (nValue= IsRewardsvout(cp,tx,vout)) > 0 ) totalinputs += nValue; else fprintf(stderr,"refsbits.%llx sbits.%llx nValue %.8f\n",(long long)refsbits,(long long)sbits,(double)nValue/COIN); - } else fprintf(stderr,"else case\n"); + } //else fprintf(stderr,"else case\n"); } else fprintf(stderr,"funcid.%d %c skipped %.8f\n",funcid,funcid,(double)tx.vout[vout].nValue/COIN); } } @@ -342,6 +342,7 @@ bool RewardsPlanExists(struct CCcontract_info *cp,uint64_t refsbits,CPubKey rewa txid = it->first.txhash; if ( GetTransaction(txid,tx,hashBlock,false) != 0 && tx.vout.size() > 0 && ConstrainVout(tx.vout[0],1,CCaddr,0) != 0 ) { + char str[65]; fprintf(stderr,"rewards plan %s\n",uint256_str(str,txid)); if ( DecodeRewardsFundingOpRet(tx.vout[tx.vout.size()-1].scriptPubKey,sbits,APR,minseconds,maxseconds,mindeposit) == 'F' ) { if ( sbits == refsbits ) @@ -511,7 +512,7 @@ std::string RewardsUnlock(uint64_t txfee,char *planstr,uint256 fundingtxid,uint2 fprintf(stderr,"Rewards plan %s doesnt exist\n",planstr); return(0); } - // need to deal with finding the right utxos + fprintf(stderr,"APR %.8f minseconds.%llu maxseconds.%llu mindeposit %.8f\n",(double)APR/COIN,(long long)minseconds,(long long)maxseconds,(double)mindeposit/COIN); if ( locktxid == zeroid ) amount = AddRewardsInputs(scriptPubKey,0,cp,mtx,rewardspk,(1LL << 30),1); else