revert result key change, fix calls to getime

Co-Authored-By: Jack Grigg <jack@z.cash>
This commit is contained in:
Alfredo Garcia 2020-07-05 11:45:30 -03:00
parent 493c0f98a2
commit afd98c5e5e
2 changed files with 4 additions and 6 deletions

View File

@ -489,8 +489,8 @@ UniValue getnetworkinfo(const UniValue& params, bool fHelp)
} }
obj.pushKV("localaddresses", localAddresses); obj.pushKV("localaddresses", localAddresses);
auto warnings = GetWarnings("statusbar"); auto warnings = GetWarnings("statusbar");
obj.pushKV("errors", warnings.first); obj.pushKV("warnings", warnings.first);
obj.pushKV("errorstimestamp",warnings.second); obj.pushKV("warningstimestamp", warnings.second);
return obj; return obj;
} }

View File

@ -26,8 +26,7 @@ void SetMiscWarning(const std::string& strWarning, int64_t timestamp)
std::pair<std::string, int64_t> GetMiscWarning() std::pair<std::string, int64_t> GetMiscWarning()
{ {
LOCK(cs_warnings); LOCK(cs_warnings);
std::pair<std::string, int64_t> misc(strMiscWarning, timestampWarning); return std::make_pair(strMiscWarning, timestampWarning);
return misc;
} }
void SetfLargeWorkForkFound(bool flag) void SetfLargeWorkForkFound(bool flag)
@ -58,8 +57,7 @@ std::pair<std::string, int64_t> GetWarnings(const std::string& strFor)
{ {
std::pair<std::string, int64_t> rpc; std::pair<std::string, int64_t> rpc;
std::pair<std::string, int64_t> statusbar; std::pair<std::string, int64_t> statusbar;
rpc.second = GetTime(); statusbar.second = rpc.second = GetTime();
statusbar.second = GetTime();
int nPriority = 0; int nPriority = 0;
LOCK(cs_warnings); LOCK(cs_warnings);