aboutsummaryrefslogtreecommitdiff
path: root/src/test/timedata_tests.cpp
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2019-12-15 12:44:09 -0300
committerJohn Newbery <john@johnnewbery.com>2019-12-15 13:24:48 -0300
commit492c6dc1e742a62599dc6d5ba6c3896825b5144f (patch)
tree662494520b876f6da7bbfb85c12ad46de249e92d /src/test/timedata_tests.cpp
parent869b6314fd180856b6054fff28b5de994252c54c (diff)
downloadbitcoin-492c6dc1e742a62599dc6d5ba6c3896825b5144f.tar.xz
util: change GetWarnings parameter to bool
GetWarnings() changes the format of the output warning string based on a passed-in string argument that can be set to "gui" or "statusbar". Change the argument to a bool: - there are only two types of behaviour, so a bool is a more natural argument type - changing the name to 'verbose' does not set any expectations for the how the calling code will use the returned string (currently, 'statusbar' is used for RPC warnings, not a status bar) - removes some error-handling code for when the passed-in string is not one of the two strings expected.
Diffstat (limited to 'src/test/timedata_tests.cpp')
-rw-r--r--src/test/timedata_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/timedata_tests.cpp b/src/test/timedata_tests.cpp
index 4721151197..19bd0d142f 100644
--- a/src/test/timedata_tests.cpp
+++ b/src/test/timedata_tests.cpp
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE(addtimedata)
MultiAddTimeData(1, DEFAULT_MAX_TIME_ADJUSTMENT + 1); //filter size 5
}
- BOOST_CHECK(GetWarnings("gui").find("clock is wrong") != std::string::npos);
+ BOOST_CHECK(GetWarnings(true).find("clock is wrong") != std::string::npos);
// nTimeOffset is not changed if the median of offsets exceeds DEFAULT_MAX_TIME_ADJUSTMENT
BOOST_CHECK_EQUAL(GetTimeOffset(), 0);