test
This commit is contained in:
@@ -2259,7 +2259,8 @@ Value resendwallettransactions(const Array& params, bool fHelp)
|
||||
return result;
|
||||
}
|
||||
|
||||
uint64_t komodo_interest(uint64_t nValue,uint32_t pastlocktime,uint32_t tiptime);
|
||||
uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
|
||||
|
||||
Value listunspent(const Array& params, bool fHelp)
|
||||
{
|
||||
if (!EnsureWalletIsAvailable(fHelp))
|
||||
@@ -2371,7 +2372,7 @@ Value listunspent(const Array& params, bool fHelp)
|
||||
uint64_t interest;
|
||||
if ( pindex != 0 )
|
||||
{
|
||||
interest = komodo_interest(nValue,out.tx->nLockTime,pindex->nTime);
|
||||
interest = komodo_interest(out.tx->nHeight,nValue,out.tx->nLockTime,pindex->nTime);
|
||||
entry.push_back(Pair("interest",ValueFromAmount(interest)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2333,7 +2333,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64_t komodo_interest(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
|
||||
uint64_t komodo_interest(int32_t txheight,uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
|
||||
|
||||
bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet, bool& fOnlyCoinbaseCoinsRet, bool& fNeedCoinbaseCoinsRet, const CCoinControl* coinControl) const
|
||||
{
|
||||
@@ -2377,7 +2377,7 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*
|
||||
if(!out.fSpendable)
|
||||
continue;
|
||||
nValueRet += out.tx->vout[out.i].nValue;
|
||||
interest = komodo_interest(out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime);
|
||||
interest = komodo_interest(out.tx->nHeight,out.tx->vout[out.i].nValue,out.tx->nLockTime,chainActive.Tip()->nTime);
|
||||
#ifdef KOMODO_ENABLE_INTEREST
|
||||
nValueRet += interest;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user