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

Function RefreshMempoolStatus

src/wallet/wallet.cpp:150–157  ·  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

148 * trusted and is eligible to be abandoned ...
149 */
150static void RefreshMempoolStatus(CWalletTx& tx, interfaces::Chain& chain)
151{
152 if (chain.isInMempool(tx.GetHash())) {
153 tx.m_state = TxStateInMempool();
154 } else if (tx.state<TxStateInMempool>()) {
155 tx.m_state = TxStateInactive();
156 }
157}
158
159bool AddWallet(WalletContext& context, const std::shared_ptr<CWallet>& wallet)
160{

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