mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Fix issue #659, and cleanup wallet/command-line argument handling a bit
This commit is contained in:
parent
4231eb217c
commit
0fcf91ea1e
5 changed files with 84 additions and 43 deletions
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+/";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue