@ -384,7 +384,7 @@ const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
}
//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 ) ;
uint64_t komodo_accrued_interest ( int32_t * txheightp , uint32_t * locktimep , uint256 hash , int32_t n , int32_t checkheight , uint64_t checkvalue ) ;
extern char ASSETCHAINS_SYMBOL [ 16 ] ;
CAmount CCoinsViewCache : : GetValueIn ( int32_t nHeight , int64_t * interestp , const CTransaction & tx , uint32_t tiptime ) const
@ -402,11 +402,11 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
{
//if ( value >= COIN*100 )
{
int64_t interest ;
interest = komodo_accrued_interest ( tx . vin [ i ] . prevout . hash , tx . vin [ i ] . prevout . n , nHeight , value ) ;
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_interest(nHeight,value,tx.nLockTime,tiptime);
printf ( " nResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u \n " , ( double ) nResult / COIN , ( double ) value / COIN , ( double ) interest / COIN , nHeight , tx . nLockT ime, tiptime ) ;
fprintf ( stderr , " nResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u \n " , ( double ) nResult / COIN , ( double ) value / COIN , ( double ) interest / COIN , nHeight , tx . nLockT ime, tiptime ) ;
printf ( " nResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u \n " , ( double ) nResult / COIN , ( double ) value / COIN , ( double ) interest / COIN , txheight , lockt ime, tiptime ) ;
fprintf ( stderr , " nResult %.8f += val %.8f interest %.8f ht.%d lock.%u tip.%u \n " , ( double ) nResult / COIN , ( double ) value / COIN , ( double ) interest / COIN , txheight , lockt ime, tiptime ) ;
nResult + = interest ;
( * interestp ) + = interest ;
}