|
|
@ -2354,7 +2354,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime); |
|
|
|
uint64_t komodo_accrued_interest(uint256 hash,int32_t n,int32_t checkheight,uint64_t checkvalue); |
|
|
|
|
|
|
|
bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet, bool& fOnlyCoinbaseCoinsRet, bool& fNeedCoinbaseCoinsRet, const CCoinControl* coinControl) const |
|
|
|
{ |
|
|
@ -2400,13 +2400,13 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx* |
|
|
|
nValueRet += out.tx->vout[out.i].nValue; |
|
|
|
#ifdef KOMODO_ENABLE_INTEREST |
|
|
|
if ( strcmp(ASSETCHAINS_SYMBOL,"REVS") == 0 )//&& chainActive.Tip()->nHeight+1 >= 60000 )
|
|
|
|
{ |
|
|
|
{sss |
|
|
|
uint64_t interest; |
|
|
|
interest = komodo_interest(chainActive.Tip()->nHeight+1,out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime); |
|
|
|
if ( interest != 0 || out.tx->vout[out.i].nValue >= COIN*100 ) |
|
|
|
//if ( interest != 0 || out.tx->vout[out.i].nValue >= COIN*100 )
|
|
|
|
{ |
|
|
|
printf("nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)out.tx->vout[out.i].nValue/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); |
|
|
|
fprintf(stderr,"nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueRet/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); |
|
|
|
printf("wallet nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)out.tx->vout[out.i].nValue/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); |
|
|
|
fprintf(stderr,"wallet nValueRet %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nValueRet/COIN,(double)interest/COIN,chainActive.Tip()->nHeight+1,out.tx->nLockTime,chainActive.Tip()->nTime); |
|
|
|
} |
|
|
|
nValueRet += interest; |
|
|
|
} |
|
|
|