test
This commit is contained in:
@@ -398,9 +398,9 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
|
|||||||
value = GetOutputFor(tx.vin[i]).nValue;
|
value = GetOutputFor(tx.vin[i]).nValue;
|
||||||
nResult += value;
|
nResult += value;
|
||||||
#ifdef KOMODO_ENABLE_INTEREST
|
#ifdef KOMODO_ENABLE_INTEREST
|
||||||
if ( value >= COIN )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 )
|
||||||
{
|
{
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 )
|
if ( value >= 10*COIN )
|
||||||
{
|
{
|
||||||
int64_t interest; int32_t txheight; uint32_t locktime;
|
int64_t interest; int32_t txheight; uint32_t locktime;
|
||||||
interest = komodo_accrued_interest(&txheight,&locktime,tx.vin[i].prevout.hash,tx.vin[i].prevout.n,0,value);
|
interest = komodo_accrued_interest(&txheight,&locktime,tx.vin[i].prevout.hash,tx.vin[i].prevout.n,0,value);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ uint64_t komodo_moneysupply(int32_t height)
|
|||||||
uint64_t komodo_interest(int32_t txheight,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)
|
||||||
{
|
{
|
||||||
int32_t minutes; uint64_t numerator,denominator,interest = 0;
|
int32_t minutes; uint64_t numerator,denominator,interest = 0;
|
||||||
if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= COIN )
|
if ( komodo_moneysupply(txheight) < MAX_MONEY && nLockTime >= LOCKTIME_THRESHOLD && tiptime != 0 && nLockTime < tiptime && nValue >= 10*COIN )
|
||||||
{
|
{
|
||||||
if ( (minutes= (tiptime - nLockTime) / 60) > 1 )
|
if ( (minutes= (tiptime - nLockTime) / 60) > 1 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1721,7 +1721,7 @@ bool NonContextualCheckInputs(const CTransaction& tx, CValidationState &state, c
|
|||||||
#ifdef KOMODO_ENABLE_INTEREST
|
#ifdef KOMODO_ENABLE_INTEREST
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 )
|
||||||
{
|
{
|
||||||
if ( coins->vout[prevout.n].nValue >= COIN )
|
if ( coins->vout[prevout.n].nValue >= 10*COIN )
|
||||||
{
|
{
|
||||||
int64_t interest; int32_t txheight; uint32_t locktime;
|
int64_t interest; int32_t txheight; uint32_t locktime;
|
||||||
if ( (interest= komodo_accrued_interest(&txheight,&locktime,prevout.hash,prevout.n,0,coins->vout[prevout.n].nValue)) != 0 )
|
if ( (interest= komodo_accrued_interest(&txheight,&locktime,prevout.hash,prevout.n,0,coins->vout[prevout.n].nValue)) != 0 )
|
||||||
|
|||||||
@@ -2210,7 +2210,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
|
|||||||
extern char ASSETCHAINS_SYMBOL[16];
|
extern char ASSETCHAINS_SYMBOL[16];
|
||||||
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 && chainActive.Tip() != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 && chainActive.Tip() != 0 )
|
||||||
{
|
{
|
||||||
if ( pcoin->vout[i].nValue >= COIN )
|
if ( pcoin->vout[i].nValue >= 10*COIN )
|
||||||
{
|
{
|
||||||
interest = komodo_interest(chainActive.Tip()->nHeight+1,pcoin->vout[i].nValue,pcoin->nLockTime,chainActive.Tip()->nTime);
|
interest = komodo_interest(chainActive.Tip()->nHeight+1,pcoin->vout[i].nValue,pcoin->nLockTime,chainActive.Tip()->nTime);
|
||||||
if ( interest != 0 )
|
if ( interest != 0 )
|
||||||
|
|||||||
Reference in New Issue
Block a user