mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
refactor: assert of masternodeSync existance moved from wallet to coinjoin
This commit is contained in:
parent
f6f6131524
commit
52153d9849
@ -1891,6 +1891,7 @@ void CCoinJoinClientManager::GetJsonInfo(UniValue& obj) const
|
||||
}
|
||||
|
||||
void CJClientManager::Add(CWallet& wallet) {
|
||||
assert(::masternodeSync != nullptr);
|
||||
m_wallet_manager_map.try_emplace(
|
||||
wallet.GetName(),
|
||||
std::make_unique<CCoinJoinClientManager>(wallet, *this, m_mn_sync, m_queueman)
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include <coinjoin/client.h>
|
||||
#include <coinjoin/options.h>
|
||||
#include <evo/providertx.h>
|
||||
#include <masternode/sync.h>
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
@ -114,7 +113,7 @@ bool AddWallet(const std::shared_ptr<CWallet>& wallet)
|
||||
}
|
||||
wallet->ConnectScriptPubKeyManNotifiers();
|
||||
wallet->AutoLockMasternodeCollaterals();
|
||||
assert(::masternodeSync != nullptr && ::coinJoinClientManagers != nullptr);
|
||||
assert(::coinJoinClientManagers != nullptr);
|
||||
::coinJoinClientManagers->Add(*wallet);
|
||||
wallet->NotifyCanGetAddressesChanged();
|
||||
return true;
|
||||
@ -4819,7 +4818,7 @@ std::shared_ptr<CWallet> CWallet::Create(interfaces::Chain& chain, const std::st
|
||||
walletInstance->GetDatabase().IncrementUpdateCounter();
|
||||
}
|
||||
|
||||
assert(::masternodeSync != nullptr && ::coinJoinClientManagers != nullptr);
|
||||
assert(::coinJoinClientManagers != nullptr);
|
||||
::coinJoinClientManagers->Add(*walletInstance);
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user