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;