| 302 | } |
| 303 | |
| 304 | CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const |
| 305 | { |
| 306 | if (tx.IsCoinBase()) |
| 307 | return 0; |
| 308 | |
| 309 | CAmount nResult = 0; |
| 310 | for (unsigned int i = 0; i < tx.vin.size(); i++) |
| 311 | nResult += GetOutputFor(tx.vin[i]).nValue; |
| 312 | |
| 313 | return nResult; |
| 314 | } |
| 315 | |
| 316 | bool CCoinsViewCache::HaveInputs(const CTransaction& tx) const |
| 317 | { |