MCPcopy Create free account
hub / github.com/ElementsProject/elements / getCoins

Method getCoins

src/wallet/interfaces.cpp:442–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

updateLabelsMethod · 0.80

Calls 6

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

Tested by

no test coverage detected