Use a typedef for monetary values

This commit is contained in:
Mark Friedenbach
2014-04-22 15:46:19 -07:00
committed by Mark Friedenbach
parent 64cfaf891f
commit a372168e77
62 changed files with 397 additions and 356 deletions

View File

@@ -171,12 +171,12 @@ const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input) const
return coins->vout[input.prevout.n];
}
int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx) const
CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const
{
if (tx.IsCoinBase())
return 0;
int64_t nResult = 0;
CAmount nResult = 0;
for (unsigned int i = 0; i < tx.vin.size(); i++)
nResult += GetOutputFor(tx.vin[i]).nValue;