MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / HaveInputs

Method HaveInputs

src/coins.cpp:235–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235bool CCoinsViewCache::HaveInputs(const CTransaction& tx) const
236{
237 if (!tx.IsCoinBase()) {
238 for (unsigned int i = 0; i < tx.vin.size(); i++) {
239 if (!HaveCoin(tx.vin[i].prevout)) {
240 return false;
241 }
242 }
243 }
244 return true;
245}
246
247static const size_t MIN_TRANSACTION_OUTPUT_WEIGHT = WITNESS_SCALE_FACTOR * ::GetSerializeSize(CTxOut(), SER_NETWORK, PROTOCOL_VERSION);
248static const size_t MAX_OUTPUTS_PER_BLOCK = MAX_BLOCK_WEIGHT / MIN_TRANSACTION_OUTPUT_WEIGHT;

Callers 2

checkMethod · 0.80
CheckTxInputsMethod · 0.80

Calls 2

IsCoinBaseMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected