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

Method getCoins

src/interfaces/wallet.cpp:398–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396 return result;
397 }
398 std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) override
399 {
400 LOCK2(::cs_main, m_wallet.cs_wallet);
401 std::vector<WalletTxOut> result;
402 result.reserve(outputs.size());
403 for (const auto& output : outputs) {
404 result.emplace_back();
405 auto it = m_wallet.mapWallet.find(output.hash);
406 if (it != m_wallet.mapWallet.end()) {
407 int depth = it->second.GetDepthInMainChain();
408 if (depth >= 0) {
409 result.back() = MakeWalletTxOut(m_wallet, it->second, output.n, depth);
410 }
411 }
412 }
413 return result;
414 }
415 CAmount getRequiredFee(unsigned int tx_bytes) override { return GetRequiredFee(m_wallet, tx_bytes); }
416 CAmount getMinimumFee(unsigned int tx_bytes,
417 const CCoinControl& coin_control,

Callers 1

updateLabelsMethod · 0.80

Calls 6

MakeWalletTxOutFunction · 0.85
GetDepthInMainChainMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected