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 2
2
// Distributed under the MIT software license, see the accompanying
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
4
5
+ #include < attributes.h>
5
6
#include < coins.h>
7
+ #include < consensus/validation.h>
6
8
#include < script/standard.h>
9
+ #include < test/test_bitcoin.h>
7
10
#include < uint256.h>
8
11
#include < undo.h>
9
12
#include < util/strencodings.h>
10
- #include < test/test_bitcoin.h>
11
13
#include < validation.h>
12
- #include < consensus/validation.h>
13
14
14
- #include < vector>
15
15
#include < map>
16
+ #include < vector>
16
17
17
18
#include < boost/test/unit_test.hpp>
18
19
@@ -36,7 +37,7 @@ class CCoinsViewTest : public CCoinsView
36
37
std::map<COutPoint, Coin> map_;
37
38
38
39
public:
39
- bool GetCoin (const COutPoint& outpoint, Coin& coin) const override
40
+ NODISCARD bool GetCoin (const COutPoint& outpoint, Coin& coin) const override
40
41
{
41
42
std::map<COutPoint, Coin>::const_iterator it = map_.find (outpoint);
42
43
if (it == map_.end ()) {
Original file line number Diff line number Diff line change @@ -102,15 +102,15 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
102
102
char key_res;
103
103
uint256 val_res;
104
104
105
- it->GetKey (key_res);
106
- it->GetValue (val_res);
105
+ BOOST_REQUIRE ( it->GetKey (key_res) );
106
+ BOOST_REQUIRE ( it->GetValue (val_res) );
107
107
BOOST_CHECK_EQUAL (key_res, key);
108
108
BOOST_CHECK_EQUAL (val_res.ToString (), in.ToString ());
109
109
110
110
it->Next ();
111
111
112
- it->GetKey (key_res);
113
- it->GetValue (val_res);
112
+ BOOST_REQUIRE ( it->GetKey (key_res) );
113
+ BOOST_REQUIRE ( it->GetValue (val_res) );
114
114
BOOST_CHECK_EQUAL (key_res, key2);
115
115
BOOST_CHECK_EQUAL (val_res.ToString (), in2.ToString ());
116
116
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ struct TestArgsManager : public ArgsManager
187
187
m_config_args.clear ();
188
188
}
189
189
std::string error;
190
- ReadConfigStream (streamConfig, error);
190
+ BOOST_REQUIRE ( ReadConfigStream (streamConfig, error) );
191
191
}
192
192
void SetNetworkOnlyArg (const std::string arg)
193
193
{
Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ class ArgsManager
151
151
std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY (cs_args);
152
152
std::set<std::string> m_config_sections GUARDED_BY (cs_args);
153
153
154
- bool ReadConfigStream (std::istream& stream, std::string& error, bool ignore_invalid_keys = false );
154
+ NODISCARD bool ReadConfigStream (std::istream& stream, std::string& error, bool ignore_invalid_keys = false );
155
155
156
156
public:
157
157
ArgsManager ();
@@ -162,7 +162,7 @@ class ArgsManager
162
162
void SelectConfigNetwork (const std::string& network);
163
163
164
164
NODISCARD bool ParseParameters (int argc, const char * const argv[], std::string& error);
165
- bool ReadConfigFiles (std::string& error, bool ignore_invalid_keys = false );
165
+ NODISCARD bool ReadConfigFiles (std::string& error, bool ignore_invalid_keys = false );
166
166
167
167
/* *
168
168
* Log warnings for options in m_section_only_args when
You can’t perform that action at this time.
0 commit comments