aboutsummaryrefslogtreecommitdiff
path: root/src/test/rpc_tests.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-02 12:30:41 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-02 12:30:49 +0200
commit816ca01650f4cc66a61ac2f9b0f8b74cd9cd0cf8 (patch)
tree0bd138342549f9eeba717090923fd0315b0d6c6f /src/test/rpc_tests.cpp
parentce3b75690d10426e97d087ca600140a19bf180b7 (diff)
parentfa7bef2e80c9c290b3e97114cfa7afdea5cbd53c (diff)
Merge bitcoin/bitcoin#25736: univalue: Remove unused and confusing set*() return value
fa7bef2e80c9c290b3e97114cfa7afdea5cbd53c univalue: Remove unused and confusing set*() return value (MacroFake) Pull request description: The value is: * currently unused, and useless without `[[nodiscard]]` * confusing, because it is always `true`, unless a num-string is set Instead of adding `[[nodiscard]]`, throw when setting is not possible. ACKs for top commit: shaavan: ACK fa7bef2e80c9c290b3e97114cfa7afdea5cbd53c aureleoules: ACK fa7bef2e80c9c290b3e97114cfa7afdea5cbd53c. Tree-SHA512: 0d74f96f34cb93b66019ab75e12334c964630cc83434f22e58cc7a4fff2ee96a5767e42ab37f08acb67aeacba6811b09c75f1edc68d5e903ccfc59b1c82de891
Diffstat (limited to 'src/test/rpc_tests.cpp')
-rw-r--r--src/test/rpc_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 3e9e04da25..a52530e179 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -181,10 +181,10 @@ BOOST_AUTO_TEST_CASE(rpc_format_monetary_values)
BOOST_CHECK_EQUAL(ValueFromAmount(std::numeric_limits<CAmount>::min()).write(), "-92233720368.54775808");
}
-static UniValue ValueFromString(const std::string &str)
+static UniValue ValueFromString(const std::string& str) noexcept
{
UniValue value;
- BOOST_CHECK(value.setNumStr(str));
+ value.setNumStr(str);
return value;
}