Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,342 Lines • ▼ Show 20 Lines | AssertLockNotHeld(cs_wallet); | ||||
initialChainTip) { | initialChainTip) { | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
// ...otherwise put a callback in the validation interface queue and wait | // ...otherwise put a callback in the validation interface queue and wait | ||||
// for the queue to drain enough to execute it (indicating we are caught up | // for the queue to drain enough to execute it (indicating we are caught up | ||||
// at least with the time we entered this function). | // at least with the time we entered this function). | ||||
SyncWithValidationInterfaceQueue(); | |||||
std::promise<void> promise; | |||||
CallFunctionInValidationInterfaceQueue([&promise] { promise.set_value(); }); | |||||
promise.get_future().wait(); | |||||
} | } | ||||
isminetype CWallet::IsMine(const CTxIn &txin) const { | isminetype CWallet::IsMine(const CTxIn &txin) const { | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
std::map<TxId, CWalletTx>::const_iterator mi = | std::map<TxId, CWalletTx>::const_iterator mi = | ||||
mapWallet.find(txin.prevout.GetTxId()); | mapWallet.find(txin.prevout.GetTxId()); | ||||
if (mi != mapWallet.end()) { | if (mi != mapWallet.end()) { | ||||
const CWalletTx &prev = (*mi).second; | const CWalletTx &prev = (*mi).second; | ||||
▲ Show 20 Lines • Show All 3,091 Lines • Show Last 20 Lines |