@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
3939 for (uint8_t k{0 }; k < 10 ; ++k) {
4040 uint8_t key{k};
4141 uint256 value{m_rng.rand256 ()};
42- BOOST_CHECK ( dbw.Write (key, value) );
42+ dbw.Write (key, value);
4343 key_values.emplace_back (key, value);
4444 }
4545 }
@@ -86,52 +86,52 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
8686 std::string key_block = " b" + m_rng.rand256 ().ToString ();
8787
8888 uint256 in_block = m_rng.rand256 ();
89- BOOST_CHECK ( dbw.Write (key_block, in_block) );
89+ dbw.Write (key_block, in_block);
9090 BOOST_CHECK (dbw.Read (key_block, res));
9191 BOOST_CHECK_EQUAL (res.ToString (), in_block.ToString ());
9292
9393 // Simulate file raw data - "f + file_number"
9494 std::string key_file = strprintf (" f%04x" , m_rng.rand32 ());
9595
9696 uint256 in_file_info = m_rng.rand256 ();
97- BOOST_CHECK ( dbw.Write (key_file, in_file_info) );
97+ dbw.Write (key_file, in_file_info);
9898 BOOST_CHECK (dbw.Read (key_file, res));
9999 BOOST_CHECK_EQUAL (res.ToString (), in_file_info.ToString ());
100100
101101 // Simulate transaction raw data - "t + transaction hash"
102102 std::string key_transaction = " t" + m_rng.rand256 ().ToString ();
103103
104104 uint256 in_transaction = m_rng.rand256 ();
105- BOOST_CHECK ( dbw.Write (key_transaction, in_transaction) );
105+ dbw.Write (key_transaction, in_transaction);
106106 BOOST_CHECK (dbw.Read (key_transaction, res));
107107 BOOST_CHECK_EQUAL (res.ToString (), in_transaction.ToString ());
108108
109109 // Simulate UTXO raw data - "c + transaction hash"
110110 std::string key_utxo = " c" + m_rng.rand256 ().ToString ();
111111
112112 uint256 in_utxo = m_rng.rand256 ();
113- BOOST_CHECK ( dbw.Write (key_utxo, in_utxo) );
113+ dbw.Write (key_utxo, in_utxo);
114114 BOOST_CHECK (dbw.Read (key_utxo, res));
115115 BOOST_CHECK_EQUAL (res.ToString (), in_utxo.ToString ());
116116
117117 // Simulate last block file number - "l"
118118 uint8_t key_last_blockfile_number{' l' };
119119 uint32_t lastblockfilenumber = m_rng.rand32 ();
120- BOOST_CHECK ( dbw.Write (key_last_blockfile_number, lastblockfilenumber) );
120+ dbw.Write (key_last_blockfile_number, lastblockfilenumber);
121121 BOOST_CHECK (dbw.Read (key_last_blockfile_number, res_uint_32));
122122 BOOST_CHECK_EQUAL (lastblockfilenumber, res_uint_32);
123123
124124 // Simulate Is Reindexing - "R"
125125 uint8_t key_IsReindexing{' R' };
126126 bool isInReindexing = m_rng.randbool ();
127- BOOST_CHECK ( dbw.Write (key_IsReindexing, isInReindexing) );
127+ dbw.Write (key_IsReindexing, isInReindexing);
128128 BOOST_CHECK (dbw.Read (key_IsReindexing, res_bool));
129129 BOOST_CHECK_EQUAL (isInReindexing, res_bool);
130130
131131 // Simulate last block hash up to which UXTO covers - 'B'
132132 uint8_t key_lastblockhash_uxto{' B' };
133133 uint256 lastblock_hash = m_rng.rand256 ();
134- BOOST_CHECK ( dbw.Write (key_lastblockhash_uxto, lastblock_hash) );
134+ dbw.Write (key_lastblockhash_uxto, lastblock_hash);
135135 BOOST_CHECK (dbw.Read (key_lastblockhash_uxto, res));
136136 BOOST_CHECK_EQUAL (lastblock_hash, res);
137137
@@ -142,7 +142,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
142142 std::string key_file_option = strprintf (" %s%01x%s" , file_option_tag, filename_length, filename);
143143
144144 bool in_file_bool = m_rng.randbool ();
145- BOOST_CHECK ( dbw.Write (key_file_option, in_file_bool) );
145+ dbw.Write (key_file_option, in_file_bool);
146146 BOOST_CHECK (dbw.Read (key_file_option, res_bool));
147147 BOOST_CHECK_EQUAL (res_bool, in_file_bool);
148148 }
@@ -195,10 +195,10 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
195195 // The two keys are intentionally chosen for ordering
196196 uint8_t key{' j' };
197197 uint256 in = m_rng.rand256 ();
198- BOOST_CHECK ( dbw.Write (key, in) );
198+ dbw.Write (key, in);
199199 uint8_t key2{' k' };
200200 uint256 in2 = m_rng.rand256 ();
201- BOOST_CHECK ( dbw.Write (key2, in2) );
201+ dbw.Write (key2, in2);
202202
203203 std::unique_ptr<CDBIterator> it (const_cast <CDBWrapper&>(dbw).NewIterator ());
204204
@@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
238238 uint256 in = m_rng.rand256 ();
239239 uint256 res;
240240
241- BOOST_CHECK ( dbw->Write (key, in) );
241+ dbw->Write (key, in);
242242 BOOST_CHECK (dbw->Read (key, res));
243243 BOOST_CHECK_EQUAL (res.ToString (), in.ToString ());
244244
@@ -261,7 +261,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
261261 uint256 res3;
262262
263263 // Check that we can write successfully
264- BOOST_CHECK ( odbw.Write (key, in2) );
264+ odbw.Write (key, in2);
265265 BOOST_CHECK (odbw.Read (key, res3));
266266 BOOST_CHECK_EQUAL (res3.ToString (), in2.ToString ());
267267}
@@ -279,7 +279,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
279279 uint256 in = m_rng.rand256 ();
280280 uint256 res;
281281
282- BOOST_CHECK ( dbw->Write (key, in) );
282+ dbw->Write (key, in);
283283 BOOST_CHECK (dbw->Read (key, res));
284284 BOOST_CHECK_EQUAL (res.ToString (), in.ToString ());
285285
@@ -298,7 +298,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
298298 uint256 res3;
299299
300300 // Check that we can write successfully
301- BOOST_CHECK ( odbw.Write (key, in2) );
301+ odbw.Write (key, in2);
302302 BOOST_CHECK (odbw.Read (key, res3));
303303 BOOST_CHECK_EQUAL (res3.ToString (), in2.ToString ());
304304}
@@ -310,7 +310,7 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
310310 for (int x=0x00 ; x<256 ; ++x) {
311311 uint8_t key = x;
312312 uint32_t value = x*x;
313- if (!(x & 1 )) BOOST_CHECK ( dbw.Write (key, value) );
313+ if (!(x & 1 )) dbw.Write (key, value);
314314 }
315315
316316 // Check that creating an iterator creates a snapshot
@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
319319 for (unsigned int x=0x00 ; x<256 ; ++x) {
320320 uint8_t key = x;
321321 uint32_t value = x*x;
322- if (x & 1 ) BOOST_CHECK ( dbw.Write (key, value) );
322+ if (x & 1 ) dbw.Write (key, value);
323323 }
324324
325325 for (const int seek_start : {0x00 , 0x80 }) {
@@ -381,7 +381,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
381381 for (int z = 0 ; z < y; ++z)
382382 key += key;
383383 uint32_t value = x*x;
384- BOOST_CHECK ( dbw.Write (StringContentsSerializer{key}, value) );
384+ dbw.Write (StringContentsSerializer{key}, value);
385385 }
386386 }
387387
0 commit comments