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

Method tryGetTxStatus

src/interfaces/wallet.cpp:293–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291 return result;
292 }
293 bool tryGetTxStatus(const uint256& txid,
294 interfaces::WalletTxStatus& tx_status,
295 int& num_blocks,
296 int64_t& adjusted_time) override
297 {
298 TRY_LOCK(::cs_main, locked_chain);
299 if (!locked_chain) {
300 return false;
301 }
302 TRY_LOCK(m_wallet.cs_wallet, locked_wallet);
303 if (!locked_wallet) {
304 return false;
305 }
306 auto mi = m_wallet.mapWallet.find(txid);
307 if (mi == m_wallet.mapWallet.end()) {
308 return false;
309 }
310 num_blocks = ::chainActive.Height();
311 adjusted_time = GetAdjustedTime();
312 tx_status = MakeWalletTxStatus(mi->second);
313 return true;
314 }
315 WalletTx getWalletTxDetails(const uint256& txid,
316 WalletTxStatus& tx_status,
317 WalletOrderForm& order_form,

Callers 1

indexMethod · 0.80

Calls 5

GetAdjustedTimeFunction · 0.85
MakeWalletTxStatusFunction · 0.85
HeightMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected