Skip to content

Commit 0cea7b1

Browse files
committed
print (none) if no warnings in -getinfo
1 parent e66630c commit 0cea7b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bitcoin-cli.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,9 @@ static void ParseGetInfoResult(UniValue& result)
10591059
result_string += "\n";
10601060
}
10611061

1062-
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, result["warnings"].getValStr());
1062+
const std::string warnings{result["warnings"].getValStr()};
1063+
result_string += strprintf("%sWarnings:%s %s", YELLOW, RESET, warnings.empty() ? "(none)" : warnings);
1064+
10631065
result.setStr(result_string);
10641066
}
10651067

0 commit comments

Comments
 (0)