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

Function RefreshMempoolStatus

src/wallet/wallet.cpp:111–118  ·  view source on GitHub ↗

* Refresh mempool status so the wallet is in an internally consistent state and * immediately knows the transaction's status: Whether it can be considered * trusted and is eligible to be abandoned ... */

Source from the content-addressed store, hash-verified

109 * trusted and is eligible to be abandoned ...
110 */
111static void RefreshMempoolStatus(CWalletTx& tx, interfaces::Chain& chain)
112{
113 if (chain.isInMempool(tx.GetHash())) {
114 tx.m_state = TxStateInMempool();
115 } else if (tx.state<TxStateInMempool>()) {
116 tx.m_state = TxStateInactive();
117 }
118}
119
120bool AddWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet)
121{

Callers 3

MarkReplacedMethod · 0.85

Calls 4

TxStateInMempoolClass · 0.85
TxStateInactiveClass · 0.85
isInMempoolMethod · 0.80
GetHashMethod · 0.45

Tested by

no test coverage detected