mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-06-02 15:32:34 +02:00
make BlockUntilSyncedToCurrentChain() const
The method checks the chain tip for the best block, and calls SyncWithValidationInterfaceQueue() (a standalone function) if necessary.
This commit is contained in:
parent
54a7ef612a
commit
dc2d0650fd
@ -270,7 +270,7 @@ void BaseIndex::ChainStateFlushed(const CBlockLocator& locator)
|
|||||||
Commit();
|
Commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseIndex::BlockUntilSyncedToCurrentChain()
|
bool BaseIndex::BlockUntilSyncedToCurrentChain() const
|
||||||
{
|
{
|
||||||
AssertLockNotHeld(cs_main);
|
AssertLockNotHeld(cs_main);
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
/// sync once and only needs to process blocks in the ValidationInterface
|
/// sync once and only needs to process blocks in the ValidationInterface
|
||||||
/// queue. If the index is catching up from far behind, this method does
|
/// queue. If the index is catching up from far behind, this method does
|
||||||
/// not block and immediately returns false.
|
/// not block and immediately returns false.
|
||||||
bool BlockUntilSyncedToCurrentChain();
|
bool BlockUntilSyncedToCurrentChain() const;
|
||||||
|
|
||||||
void Interrupt();
|
void Interrupt();
|
||||||
|
|
||||||
|
@ -1150,7 +1150,7 @@ void CWallet::UpdatedBlockTip()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CWallet::BlockUntilSyncedToCurrentChain() {
|
void CWallet::BlockUntilSyncedToCurrentChain() const {
|
||||||
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 queue and wait
|
// ::ChainActive().Tip(), otherwise put a callback in the validation interface queue and wait
|
||||||
|
@ -1112,7 +1112,7 @@ public:
|
|||||||
* Obviously holding cs_main/cs_wallet when going into this call may cause
|
* Obviously holding cs_main/cs_wallet when going into this call may cause
|
||||||
* deadlock
|
* deadlock
|
||||||
*/
|
*/
|
||||||
void BlockUntilSyncedToCurrentChain() LOCKS_EXCLUDED(cs_main, cs_wallet);
|
void BlockUntilSyncedToCurrentChain() const LOCKS_EXCLUDED(cs_main, cs_wallet);
|
||||||
|
|
||||||
/** set a single wallet flag */
|
/** set a single wallet flag */
|
||||||
void SetWalletFlag(uint64_t flags);
|
void SetWalletFlag(uint64_t flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user