Do not clear the object pased into CPrivateSendClient*::GetJsonInfo()

Just verify that it's of a proper type instead
This commit is contained in:
UdjinM6 2020-07-17 02:27:35 +03:00 committed by pasta
parent a7e0957c82
commit 4ac00e5589
No known key found for this signature in database
GPG Key ID: 52527BEDABE87984

View File

@ -1814,8 +1814,7 @@ void CPrivateSendClientManager::DoMaintenance(CConnman& connman)
void CPrivateSendClientSession::GetJsonInfo(UniValue& obj) const
{
obj.clear();
obj.setObject();
assert(obj.isObject());
if (mixingMasternode != nullptr) {
assert(mixingMasternode->pdmnState);
obj.pushKV("protxhash", mixingMasternode->proTxHash.ToString());
@ -1830,8 +1829,7 @@ void CPrivateSendClientSession::GetJsonInfo(UniValue& obj) const
void CPrivateSendClientManager::GetJsonInfo(UniValue& obj) const
{
LOCK(cs_deqsessions);
obj.clear();
obj.setObject();
assert(obj.isObject());
obj.pushKV("running", IsMixing());
UniValue arrSessions(UniValue::VARR);