Skip to content

Commit

Permalink
[Trivial] Fix some active masternode error LogPrint to LogPrintf
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Sep 19, 2021
1 parent e0572cc commit 1451764
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/activemasternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,12 +472,13 @@ void CActiveMasternode::GetKeys(CKey& _privKeyMasternode, CPubKey& _pubKeyMaster
bool GetActiveDMNKeys(CBLSSecretKey& key, CBLSPublicKey& pubkey, CTxIn& vin)
{
if (activeMasternodeManager == nullptr) {
LogPrintf("%s: Active Masternode not initialized\n", __func__);
return false;
}
CDeterministicMNCPtr dmn;
auto res = activeMasternodeManager->GetOperatorKey(key, pubkey, dmn);
if (!res) {
LogPrint(BCLog::MNBUDGET,"%s: %s\n", __func__, res.getError());
LogPrintf("%s: %s\n", __func__, res.getError());
return false;
}
vin = CTxIn(dmn->collateralOutpoint);
Expand All @@ -494,11 +495,11 @@ bool GetActiveMasternodeKeys(CTxIn& vin, Optional<CKey>& key, CBLSSecretKey& bls
}
// legacy mn
if (activeMasternode.vin == nullopt) {
LogPrint(BCLog::MNBUDGET,"%s: Active Masternode not initialized\n", __func__);
LogPrintf("%s: Active Masternode not initialized\n", __func__);
return false;
}
if (activeMasternode.GetStatus() != ACTIVE_MASTERNODE_STARTED) {
LogPrint(BCLog::MNBUDGET,"%s: MN not started (%s)\n", __func__, activeMasternode.GetStatusMessage());
LogPrintf("%s: MN not started (%s)\n", __func__, activeMasternode.GetStatusMessage());
return false;
}
vin = *activeMasternode.vin;
Expand Down

0 comments on commit 1451764

Please sign in to comment.