mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
Fix issue #659, and cleanup wallet/command-line argument handling a bit
This commit is contained in:
17
src/util.cpp
17
src/util.cpp
@@ -470,6 +470,23 @@ void ParseParameters(int argc, char* argv[])
|
||||
}
|
||||
}
|
||||
|
||||
bool SoftSetArg(const std::string& strArg, const std::string& strValue)
|
||||
{
|
||||
if (mapArgs.count(strArg))
|
||||
return false;
|
||||
mapArgs[strArg] = strValue;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SoftSetArg(const std::string& strArg, bool fValue)
|
||||
{
|
||||
if (fValue)
|
||||
return SoftSetArg(strArg, std::string("1"));
|
||||
else
|
||||
return SoftSetArg(strArg, std::string("0"));
|
||||
}
|
||||
|
||||
|
||||
string EncodeBase64(const unsigned char* pch, size_t len)
|
||||
{
|
||||
static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
Reference in New Issue
Block a user