This commit is contained in:
jl777
2016-11-15 10:38:38 -03:00
parent a130c5cb66
commit 0fec0cc4b3
6 changed files with 44 additions and 35 deletions

View File

@@ -388,7 +388,6 @@ extern char ASSETCHAINS_SYMBOL[16];
CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
{
uint32_t timestamp,minutes; int64_t interest;
*interestp = 0;
if ( tx.IsCoinBase() != 0 )
return 0;
@@ -397,18 +396,19 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
{
value = GetOutputFor(tx.vin[i]).nValue;
nResult += value;
interest = komodo_interest(nHeight,value,tx.nLockTime,tiptime);
#ifdef KOMODO_ENABLE_INTEREST
if ( ASSETCHAINS_SYMBOL[0] == 0 && nHeight >= 60000 )
if ( strcmp(ASSETCHAINS_SYMBOL,"REVS") == 0 )//&& nHeight >= 60000 )
{
//if ( interest != 0 )
int64_t interest;
interest = komodo_interest(nHeight,value,tx.nLockTime,tiptime);
if ( interest != 0 || value >= COIN*100 )
{
printf("nResult %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nResult/COIN,(double)interest/COIN,nHeight,tx.nLockTime,tiptime);
fprintf(stderr,"nResult %.8f += interest %.8f ht.%d lock.%u tip.%u\n",(double)nResult/COIN,(double)interest/COIN,nHeight,tx.nLockTime,tiptime);
}
nResult += interest;
(*interestp) += interest;
}
(*interestp) += interest;
#endif
}
nResult += tx.GetJoinSplitValueIn();