Skip to content

Commit 86ba41b

Browse files
committed
Whitespace, comments.
1 parent 47b28d6 commit 86ba41b

2 files changed

Lines changed: 20 additions & 26 deletions

File tree

test/query/archive_read.cpp

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ static_assert(is_same_type<database::context::flag_t::integer, decltype(system::
2828
// nop event handler.
2929
const auto events_handler = [](auto, auto) {};
3030

31-
// ----------------------------------------------------------------------------
32-
33-
// archive_write (foreign-keyed)
34-
3531
BOOST_AUTO_TEST_CASE(query_archive_read__is_coinbase__coinbase__true)
3632
{
3733
settings settings{};
@@ -252,17 +248,17 @@ BOOST_AUTO_TEST_CASE(query_archive_read__get_point_key__always__expected)
252248
// tx4/5 prevouts are all block1a.tx1.
253249
BOOST_REQUIRE(query.set(test::tx4));
254250
BOOST_REQUIRE(query.set(test::tx5));
255-
//// BOOST_REQUIRE_EQUAL(query.get_point_hash(0), test::block1a.transactions_ptr()->front()->hash(false));
251+
////BOOST_REQUIRE_EQUAL(query.get_point_hash(0), test::block1a.transactions_ptr()->front()->hash(false));
256252
BOOST_REQUIRE_EQUAL(query.get_point_hash(1), test::block1a.transactions_ptr()->front()->hash(false));
257253
BOOST_REQUIRE_EQUAL(query.get_point_hash(2), test::block1a.transactions_ptr()->front()->hash(false));
258-
//// BOOST_REQUIRE_EQUAL(query.get_point_hash(3), system::null_hash);
254+
////BOOST_REQUIRE_EQUAL(query.get_point_hash(3), system::null_hash);
259255

260256
// block1a adds three prevouts of two txs.
261257
BOOST_REQUIRE(query.set(test::block1a, context{}, false, false));
262-
//// BOOST_REQUIRE_EQUAL(query.get_point_hash(3), system::one_hash);
258+
////BOOST_REQUIRE_EQUAL(query.get_point_hash(3), system::one_hash);
263259
BOOST_REQUIRE_EQUAL(query.get_point_hash(4), system::one_hash);
264-
//// BOOST_REQUIRE_EQUAL(query.get_point_hash(5), test::two_hash);
265-
//// BOOST_REQUIRE_EQUAL(query.get_point_hash(6), system::null_hash);
260+
////BOOST_REQUIRE_EQUAL(query.get_point_hash(5), test::two_hash);
261+
////BOOST_REQUIRE_EQUAL(query.get_point_hash(6), system::null_hash);
266262
}
267263

268264
BOOST_AUTO_TEST_CASE(query_archive_read__get_tx_key__always__expected)
@@ -656,28 +652,28 @@ BOOST_AUTO_TEST_CASE(query_archive_read__get_spenders__unspent_or_not_found__exp
656652

657653
// Caller should always test for nullptr.
658654
BOOST_REQUIRE(query.get_spenders(output_link::terminal, true)->empty());
659-
//BOOST_REQUIRE(query.get_spenders_index(tx_link::terminal, 0, true)->empty());
660-
//BOOST_REQUIRE(query.get_spenders_index(tx_link::terminal, 1, true)->empty());
655+
////BOOST_REQUIRE(query.get_spenders_index(tx_link::terminal, 0, true)->empty());
656+
////BOOST_REQUIRE(query.get_spenders_index(tx_link::terminal, 1, true)->empty());
661657

662658
BOOST_REQUIRE(query.get_spenders(query.to_output(0, 0), true)->empty());
663659
BOOST_REQUIRE(query.get_spenders(query.to_output(0, 1), true)->empty());
664-
//BOOST_REQUIRE(query.get_spenders_index(0, 0, true)->empty());
665-
//BOOST_REQUIRE(query.get_spenders_index(0, 1, true)->empty());
660+
///BOOST_REQUIRE(query.get_spenders_index(0, 0, true)->empty());
661+
////BOOST_REQUIRE(query.get_spenders_index(0, 1, true)->empty());
666662

667663
BOOST_REQUIRE(query.get_spenders(query.to_output(1, 0), true)->empty());
668664
BOOST_REQUIRE(query.get_spenders(query.to_output(1, 1), true)->empty());
669-
//BOOST_REQUIRE(query.get_spenders_index(1, 0, true)->empty());
670-
//BOOST_REQUIRE(query.get_spenders_index(1, 1, true)->empty());
665+
////BOOST_REQUIRE(query.get_spenders_index(1, 0, true)->empty());
666+
////BOOST_REQUIRE(query.get_spenders_index(1, 1, true)->empty());
671667

672668
BOOST_REQUIRE(query.get_spenders(query.to_output(2, 0), true)->empty());
673669
BOOST_REQUIRE(query.get_spenders(query.to_output(2, 1), true)->empty());
674-
//BOOST_REQUIRE(query.get_spenders_index(2, 0, true)->empty());
675-
//BOOST_REQUIRE(query.get_spenders_index(2, 1, true)->empty());
670+
////BOOST_REQUIRE(query.get_spenders_index(2, 0, true)->empty());
671+
////BOOST_REQUIRE(query.get_spenders_index(2, 1, true)->empty());
676672

677673
BOOST_REQUIRE(query.get_spenders(query.to_output(3, 0), true)->empty());
678674
BOOST_REQUIRE(query.get_spenders(query.to_output(3, 1), true)->empty());
679-
//BOOST_REQUIRE(query.get_spenders_index(3, 0, true)->empty());
680-
//BOOST_REQUIRE(query.get_spenders_index(3, 1, true)->empty());
675+
////BOOST_REQUIRE(query.get_spenders_index(3, 0, true)->empty());
676+
////BOOST_REQUIRE(query.get_spenders_index(3, 1, true)->empty());
681677
}
682678

683679
////BOOST_AUTO_TEST_CASE(query_archive_read__get_spenders__found_and_spent__expected)

test/query/archive_write.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ static_assert(is_same_type<database::context::flag_t::integer, decltype(system::
2828
// nop event handler.
2929
const auto events_handler = [](auto, auto) {};
3030

31-
// archive_write (natural-keyed)
32-
3331
// slow test (mmap)
3432
BOOST_AUTO_TEST_CASE(query_archive_write__set_header__mmap_get_header__expected)
3533
{
@@ -1145,17 +1143,17 @@ BOOST_AUTO_TEST_CASE(query_archive_write__get_point_key__always__expected)
11451143
// tx4/5 prevouts are all block1a.tx1.
11461144
BOOST_CHECK(query.set(test::tx4));
11471145
BOOST_CHECK(query.set(test::tx5));
1148-
//// BOOST_CHECK_EQUAL(query.get_point_hash(0), test::block1a.transactions_ptr()->front()->hash(false));
1146+
////BOOST_CHECK_EQUAL(query.get_point_hash(0), test::block1a.transactions_ptr()->front()->hash(false));
11491147
BOOST_CHECK_EQUAL(query.get_point_hash(1), test::block1a.transactions_ptr()->front()->hash(false));
11501148
BOOST_CHECK_EQUAL(query.get_point_hash(2), test::block1a.transactions_ptr()->front()->hash(false));
1151-
//// BOOST_CHECK_EQUAL(query.get_point_hash(3), system::null_hash);
1149+
////BOOST_CHECK_EQUAL(query.get_point_hash(3), system::null_hash);
11521150

11531151
// block1a adds three prevouts of two txs.
11541152
BOOST_CHECK(query.set(test::block1a, context{}, false, false));
1155-
//// BOOST_CHECK_EQUAL(query.get_point_hash(3), system::one_hash);
1153+
////BOOST_CHECK_EQUAL(query.get_point_hash(3), system::one_hash);
11561154
BOOST_CHECK_EQUAL(query.get_point_hash(4), system::one_hash);
1157-
//// BOOST_CHECK_EQUAL(query.get_point_hash(5), test::two_hash);
1158-
//// BOOST_CHECK_EQUAL(query.get_point_hash(6), system::null_hash);
1155+
////BOOST_CHECK_EQUAL(query.get_point_hash(5), test::two_hash);
1156+
////BOOST_CHECK_EQUAL(query.get_point_hash(6), system::null_hash);
11591157
}
11601158

11611159
BOOST_AUTO_TEST_CASE(query_archive_write__get_tx_key__always__expected)

0 commit comments

Comments
 (0)