This commit is contained in:
jl777
2016-10-22 10:41:02 -03:00
parent b927fb3535
commit a6ce4b84b1
2 changed files with 1 additions and 13 deletions

View File

@@ -383,7 +383,6 @@ const CScript &CCoinsViewCache::GetSpendFor(const CTxIn& input) const
return coins->vout[input.prevout.n].scriptPubKey;
}
uint32_t komodo_txtime(uint256 hash);
uint64_t komodo_interest(uint64_t nValue,uint32_t nLockTime,uint32_t tiptime);
CAmount CCoinsViewCache::GetValueIn(int64_t *interestp,const CTransaction& tx,uint32_t tiptime) const
@@ -397,7 +396,7 @@ CAmount CCoinsViewCache::GetValueIn(int64_t *interestp,const CTransaction& tx,ui
{
value = GetOutputFor(tx.vin[i]).nValue;
nResult += value;
interest = komodo_interest(value,komodo_txtime(tx.vin[i].prevout.hash),tiptime);
interest = komodo_interest(value,tx.nLockTime,tiptime);
nResult += interest;
(*interestp) += interest;
}

View File

@@ -257,17 +257,6 @@ uint32_t komodo_txtime(uint256 hash)
//printf("null GetTransaction\n");
return(tx.nLockTime);
}
/*if (!hashBlock.IsNull()) {
BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
if (mi != mapBlockIndex.end() && (*mi).second)
{
CBlockIndex* pindex = (*mi).second;
if (chainActive.Contains(pindex))
return(pindex->GetBlockTime());
}
//printf("cant find in iterator\n");
}*/
//printf("null hashBlock\n");
return(0);
}