// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+// file COPYING or https://www.opensource.org/licenses/mit-license.php .
#include "alert.h"
strComment.clear();
strStatusBar.clear();
- strReserved.clear();
+ strRPCError.clear();
}
std::string CUnsignedAlert::ToString() const
BOOST_FOREACH(int n, setCancel)
strSetCancel += strprintf("%d ", n);
std::string strSetSubVer;
- BOOST_FOREACH(std::string str, setSubVer)
+ BOOST_FOREACH(const std::string& str, setSubVer)
strSetSubVer += "\"" + str + "\" ";
return strprintf(
"CAlert(\n"
" nPriority = %d\n"
" strComment = \"%s\"\n"
" strStatusBar = \"%s\"\n"
+ " strRPCError = \"%s\"\n"
")\n",
nVersion,
nRelayUntil,
strSetSubVer,
nPriority,
strComment,
- strStatusBar);
+ strStatusBar,
+ strRPCError);
}
void CAlert::SetNull()
return (alert.nID <= nCancel || setCancel.count(alert.nID));
}
-bool CAlert::AppliesTo(int nVersion, std::string strSubVerIn) const
+bool CAlert::AppliesTo(int nVersion, const std::string& strSubVerIn) const
{
// TODO: rework for client-version-embedded-in-strSubVer ?
return (IsInEffect() &&