File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 22// Distributed under the MIT software license, see the accompanying
33// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44
5+ #include < attributes.h>
56#include < coins.h>
7+ #include < consensus/validation.h>
68#include < script/standard.h>
9+ #include < test/test_bitcoin.h>
710#include < uint256.h>
811#include < undo.h>
912#include < util/strencodings.h>
10- #include < test/test_bitcoin.h>
1113#include < validation.h>
12- #include < consensus/validation.h>
1314
14- #include < vector>
1515#include < map>
16+ #include < vector>
1617
1718#include < boost/test/unit_test.hpp>
1819
@@ -36,7 +37,7 @@ class CCoinsViewTest : public CCoinsView
3637 std::map<COutPoint, Coin> map_;
3738
3839public:
39- bool GetCoin (const COutPoint& outpoint, Coin& coin) const override
40+ NODISCARD bool GetCoin (const COutPoint& outpoint, Coin& coin) const override
4041 {
4142 std::map<COutPoint, Coin>::const_iterator it = map_.find (outpoint);
4243 if (it == map_.end ()) {
Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
102102 char key_res;
103103 uint256 val_res;
104104
105- it->GetKey (key_res);
106- it->GetValue (val_res);
105+ BOOST_REQUIRE ( it->GetKey (key_res) );
106+ BOOST_REQUIRE ( it->GetValue (val_res) );
107107 BOOST_CHECK_EQUAL (key_res, key);
108108 BOOST_CHECK_EQUAL (val_res.ToString (), in.ToString ());
109109
110110 it->Next ();
111111
112- it->GetKey (key_res);
113- it->GetValue (val_res);
112+ BOOST_REQUIRE ( it->GetKey (key_res) );
113+ BOOST_REQUIRE ( it->GetValue (val_res) );
114114 BOOST_CHECK_EQUAL (key_res, key2);
115115 BOOST_CHECK_EQUAL (val_res.ToString (), in2.ToString ());
116116
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ struct TestArgsManager : public ArgsManager
187187 m_config_args.clear ();
188188 }
189189 std::string error;
190- ReadConfigStream (streamConfig, error);
190+ BOOST_REQUIRE ( ReadConfigStream (streamConfig, error) );
191191 }
192192 void SetNetworkOnlyArg (const std::string arg)
193193 {
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ class ArgsManager
150150 std::set<std::string> m_network_only_args GUARDED_BY (cs_args);
151151 std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY (cs_args);
152152
153- bool ReadConfigStream (std::istream& stream, std::string& error, bool ignore_invalid_keys = false );
153+ NODISCARD bool ReadConfigStream (std::istream& stream, std::string& error, bool ignore_invalid_keys = false );
154154
155155public:
156156 ArgsManager ();
@@ -161,7 +161,7 @@ class ArgsManager
161161 void SelectConfigNetwork (const std::string& network);
162162
163163 NODISCARD bool ParseParameters (int argc, const char * const argv[], std::string& error);
164- bool ReadConfigFiles (std::string& error, bool ignore_invalid_keys = false );
164+ NODISCARD bool ReadConfigFiles (std::string& error, bool ignore_invalid_keys = false );
165165
166166 /* *
167167 * Log warnings for options in m_section_only_args when
You can’t perform that action at this time.
0 commit comments