Skip to content

Commit

Permalink
Remove more useless obfuscation code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuzzbawls committed May 15, 2019
1 parent eed0a1d commit fe67706
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
66 changes: 0 additions & 66 deletions src/obfuscation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,72 +107,6 @@ void CObfuscationPool::UnlockCoins()
lockedCoins.clear();
}

std::string CObfuscationPool::GetStatus()
{
static int showingObfuScationMessage = 0;
showingObfuScationMessage += 10;
std::string suffix = "";

if (chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing || !masternodeSync.IsBlockchainSynced()) {
return strAutoDenomResult;
}
switch (state) {
case POOL_STATUS_IDLE:
return _("Obfuscation is idle.");
case POOL_STATUS_ACCEPTING_ENTRIES:
if (entriesCount == 0) {
showingObfuScationMessage = 0;
return strAutoDenomResult;
} else if (lastEntryAccepted == 1) {
if (showingObfuScationMessage % 10 > 8) {
lastEntryAccepted = 0;
showingObfuScationMessage = 0;
}
return _("Obfuscation request complete:") + " " + _("Your transaction was accepted into the pool!");
} else {
std::string suffix = "";
if (showingObfuScationMessage % 70 <= 40)
return strprintf(_("Submitted following entries to masternode: %u / %d"), entriesCount, GetMaxPoolTransactions());
else if (showingObfuScationMessage % 70 <= 50)
suffix = ".";
else if (showingObfuScationMessage % 70 <= 60)
suffix = "..";
else if (showingObfuScationMessage % 70 <= 70)
suffix = "...";
return strprintf(_("Submitted to masternode, waiting for more entries ( %u / %d ) %s"), entriesCount, GetMaxPoolTransactions(), suffix);
}
case POOL_STATUS_SIGNING:
if (showingObfuScationMessage % 70 <= 40)
return _("Found enough users, signing ...");
else if (showingObfuScationMessage % 70 <= 50)
suffix = ".";
else if (showingObfuScationMessage % 70 <= 60)
suffix = "..";
else if (showingObfuScationMessage % 70 <= 70)
suffix = "...";
return strprintf(_("Found enough users, signing ( waiting %s )"), suffix);
case POOL_STATUS_TRANSMISSION:
return _("Transmitting final transaction.");
case POOL_STATUS_FINALIZE_TRANSACTION:
return _("Finalizing transaction.");
case POOL_STATUS_ERROR:
return _("Obfuscation request incomplete:") + " " + lastMessage + " " + _("Will retry...");
case POOL_STATUS_SUCCESS:
return _("Obfuscation request complete:") + " " + lastMessage;
case POOL_STATUS_QUEUE:
if (showingObfuScationMessage % 70 <= 30)
suffix = ".";
else if (showingObfuScationMessage % 70 <= 50)
suffix = "..";
else if (showingObfuScationMessage % 70 <= 70)
suffix = "...";
return strprintf(_("Submitted to masternode, waiting in queue %s"), suffix);
;
default:
return strprintf(_("Unknown state: id = %u"), state);
}
}

//
// Check the Obfuscation progress and send client updates if a Masternode
//
Expand Down
2 changes: 0 additions & 2 deletions src/obfuscation.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,6 @@ class CObfuscationPool
return state;
}

std::string GetStatus();

int GetEntriesCount() const
{
return entries.size();
Expand Down

0 comments on commit fe67706

Please sign in to comment.