Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 1,193 Lines • ▼ Show 20 Lines | |||||
void CWallet::BlockUntilSyncedToCurrentChain() { | void CWallet::BlockUntilSyncedToCurrentChain() { | ||||
AssertLockNotHeld(cs_wallet); | AssertLockNotHeld(cs_wallet); | ||||
// Skip the queue-draining stuff if we know we're caught up with | // Skip the queue-draining stuff if we know we're caught up with | ||||
// chainActive.Tip(), otherwise put a callback in the validation interface | // chainActive.Tip(), otherwise put a callback in the validation interface | ||||
// queue and wait for the queue to drain enough to execute it (indicating we | // queue and wait for the queue to drain enough to execute it (indicating we | ||||
// are caught up at least with the time we entered this function). | // are caught up at least with the time we entered this function). | ||||
const BlockHash last_block_hash = | const BlockHash last_block_hash = | ||||
WITH_LOCK(cs_wallet, return m_last_block_processed); | WITH_LOCK(cs_wallet, return m_last_block_processed); | ||||
chain().waitForNotificationsIfNewBlocksConnected(last_block_hash); | chain().waitForNotificationsIfTipChanged(last_block_hash); | ||||
} | } | ||||
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,290 Lines • Show Last 20 Lines |