aboutsummaryrefslogtreecommitdiff
path: root/src/coins.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-04-26 16:09:27 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2017-06-01 13:15:25 -0700
commit119e552f7ccd49c0137a3c6b4f94018a84d69620 (patch)
tree8f57485e1a2e8e4a420081caf9378eda390163cd /src/coins.cpp
parent580b023092a28f444068b53792eb542f9d5e6892 (diff)
Merge CCoinsViewCache's GetOutputFor and AccessCoin
They're doing the same thing now.
Diffstat (limited to 'src/coins.cpp')
-rw-r--r--src/coins.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/coins.cpp b/src/coins.cpp
index 09fd2b13d0..59bcdce9c4 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -213,13 +213,6 @@ unsigned int CCoinsViewCache::GetCacheSize() const {
return cacheCoins.size();
}
-const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input) const
-{
- const Coin& coin = AccessCoin(input.prevout);
- assert(!coin.IsPruned());
- return coin.out;
-}
-
CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const
{
if (tx.IsCoinBase())
@@ -227,7 +220,7 @@ CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const
CAmount nResult = 0;
for (unsigned int i = 0; i < tx.vin.size(); i++)
- nResult += GetOutputFor(tx.vin[i]).nValue;
+ nResult += AccessCoin(tx.vin[i].prevout).out.nValue;
return nResult;
}