MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / getCoins

Method getCoins

src/wallet/interfaces.cpp:450–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448 return result;
449 }
450 std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) override
451 {
452 LOCK(m_wallet->cs_wallet);
453 std::vector<WalletTxOut> result;
454 result.reserve(outputs.size());
455 for (const auto& output : outputs) {
456 result.emplace_back();
457 auto it = m_wallet->mapWallet.find(output.hash);
458 if (it != m_wallet->mapWallet.end()) {
459 int depth = m_wallet->GetTxDepthInMainChain(it->second);
460 if (depth >= 0) {
461 result.back() = MakeWalletTxOut(*m_wallet, it->second, output.n, depth);
462 }
463 }
464 }
465 return result;
466 }
467 CAmount getRequiredFee(unsigned int tx_bytes) override { return GetRequiredFee(*m_wallet, tx_bytes); }
468 CAmount getMinimumFee(unsigned int tx_bytes,
469 const CCoinControl& coin_control,

Callers 1

updateLabelsMethod · 0.80

Calls 7

findMethod · 0.80
GetTxDepthInMainChainMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
emplace_backMethod · 0.45
endMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected