mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
print (none)
if no warnings in -getinfo
This commit is contained in:
parent
e66630cc87
commit
0cea7b10f1
1 changed files with 3 additions and 1 deletions
|
@ -1059,7 +1059,9 @@ static void ParseGetInfoResult(UniValue& result)
|
|||
result_string += "\n";
|
||||
}
|
||||
|
||||
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, result["warnings"].getValStr());
|
||||
const std::string warnings{result["warnings"].getValStr()};
|
||||
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, warnings.empty() ? "(none)" : warnings);
|
||||
|
||||
result.setStr(result_string);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue