From 386a408f74c32f0d85c4c36cecd6da21c24f6850 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 27 Jul 2018 09:18:16 -1100 Subject: [PATCH] Teest --- src/cc/CCinclude.h | 4 ++++ src/cc/rewards.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cc/CCinclude.h b/src/cc/CCinclude.h index eab868620..259b33ab6 100644 --- a/src/cc/CCinclude.h +++ b/src/cc/CCinclude.h @@ -28,6 +28,10 @@ #include #include +/* + A very important thing to make sure is that the change calculation is correct and takes care of handling transitions from CC outputs to normal, and vice versa + */ + #define SMALLVAL 0.000000000000001 struct CCcontract_info diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index dda100d5f..e8d51653a 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -404,7 +404,7 @@ std::string RewardsLock(uint64_t txfee,char *planstr,uint256 fundingtxid,int64_t std::string RewardsUnlock(uint64_t txfee,char *planstr,uint256 fundingtxid,uint256 locktxid) { - CMutableTransaction mtx; char coinaddr[64]; CPubKey mypk,rewardspk; CScript opret; uint64_t funding,sbits,reward,amount=0,inputs,CCchange=0,APR,minseconds,maxseconds,mindeposit; struct CCcontract_info *cp,C; + CMutableTransaction mtx; char coinaddr[64]; CPubKey mypk,rewardspk; CScript opret; uint64_t funding,sbits,reward=0,amount=0,inputs,CCchange=0,APR,minseconds,maxseconds,mindeposit; struct CCcontract_info *cp,C; cp = CCinit(&C,EVAL_REWARDS); if ( txfee == 0 ) txfee = 10000;