@@ -42,14 +42,14 @@ BOOST_AUTO_TEST_CASE(query_address__get_history__genesis__expected)
4242
4343 out.clear ();
4444 BOOST_REQUIRE (!query.get_confirmed_history (cancel, out, test::genesis_address0));
45- BOOST_REQUIRE_EQUAL (out.at (0 ).fee , 0u );
45+ BOOST_REQUIRE_EQUAL (out.at (0 ).fee , history::missing_prevout );
4646 BOOST_REQUIRE_EQUAL (out.at (0 ).position , 0u );
4747 BOOST_REQUIRE_EQUAL (out.at (0 ).tx .height (), 0u );
4848 BOOST_REQUIRE_EQUAL (out.at (0 ).tx .hash (), test::genesis.transactions_ptr ()->at (0 )->hash (false ));
4949
5050 out.clear ();
5151 BOOST_REQUIRE (!query.get_history (cancel, out, test::genesis_address0));
52- BOOST_REQUIRE_EQUAL (out.at (0 ).fee , 0u );
52+ BOOST_REQUIRE_EQUAL (out.at (0 ).fee , history::missing_prevout );
5353 BOOST_REQUIRE_EQUAL (out.at (0 ).position , 0u );
5454 BOOST_REQUIRE_EQUAL (out.at (0 ).tx .height (), 0u );
5555 BOOST_REQUIRE_EQUAL (out.at (0 ).tx .hash (), test::genesis.transactions_ptr ()->at (0 )->hash (false ));
@@ -96,34 +96,34 @@ BOOST_AUTO_TEST_CASE(query_address__get_unconfirmed_history__turbo_block1a_addre
9696 BOOST_REQUIRE_EQUAL (out.size (), 4u );
9797
9898 // Identities (not part of sort).
99- BOOST_REQUIRE_EQUAL (out.at (0 ).tx .hash (), test::tx4 .hash (false )); // tx4
100- BOOST_REQUIRE_EQUAL (out.at (1 ).tx .hash (), test::block2b. transactions_ptr ()-> at ( 0 )-> hash (false )); // tx8
101- BOOST_REQUIRE_EQUAL (out.at (2 ).tx .hash (), test::tx5. hash (false )); // tx5
102- BOOST_REQUIRE_EQUAL (out.at (3 ).tx .hash (), test::block1b.transactions_ptr ()->at (0 )->hash (false )); // tx7
99+ BOOST_CHECK_EQUAL (out.at (0 ).tx .hash (), test::tx5 .hash (false )); // tx5
100+ BOOST_CHECK_EQUAL (out.at (1 ).tx .hash (), test::tx4. hash (false )); // tx4
101+ BOOST_CHECK_EQUAL (out.at (2 ).tx .hash (), test::block2b. transactions_ptr ()-> at ( 0 )-> hash (false )); // tx8
102+ BOOST_CHECK_EQUAL (out.at (3 ).tx .hash (), test::block1b.transactions_ptr ()->at (0 )->hash (false )); // tx7
103103
104104 // Confirmed by height ascending (not part of sort).
105105
106106 // Unconfirmed rooted before unrooted.
107- BOOST_REQUIRE_EQUAL (out.at (0 ).tx .height (), history::rooted_height); // spends block1a (tx0 both outputs).
108- BOOST_REQUIRE_EQUAL (out.at (1 ).tx .height (), history::unrooted_height ); // bk2btx0 unrooted ( spends bk1).
109- BOOST_REQUIRE_EQUAL (out.at (2 ).tx .height (), history::unrooted_height); // spend exceeds value (treated as missing prevout).
110- BOOST_REQUIRE_EQUAL (out.at (3 ).tx .height (), history::unrooted_height); // bk1btx0 unrooted ( missing prevouts).
107+ BOOST_CHECK_EQUAL (out.at (0 ).tx .height (), history::rooted_height); // tx5 spends block1a
108+ BOOST_CHECK_EQUAL (out.at (1 ).tx .height (), history::rooted_height ); // tx4 spends block1a
109+ BOOST_CHECK_EQUAL (out.at (2 ).tx .height (), history::unrooted_height); // block2b spends block1b
110+ BOOST_CHECK_EQUAL (out.at (3 ).tx .height (), history::unrooted_height); // block1b missing prevouts
111111
112112 // Confirmed height by block position (not part of sort).
113- BOOST_REQUIRE_EQUAL (out.at (0 ).position , history::unconfirmed_position);
114- BOOST_REQUIRE_EQUAL (out.at (1 ).position , history::unconfirmed_position);
115- BOOST_REQUIRE_EQUAL (out.at (2 ).position , history::unconfirmed_position);
116- BOOST_REQUIRE_EQUAL (out.at (3 ).position , history::unconfirmed_position);
113+ BOOST_CHECK_EQUAL (out.at (0 ).position , history::unconfirmed_position);
114+ BOOST_CHECK_EQUAL (out.at (1 ).position , history::unconfirmed_position);
115+ BOOST_CHECK_EQUAL (out.at (2 ).position , history::unconfirmed_position);
116+ BOOST_CHECK_EQUAL (out.at (3 ).position , history::unconfirmed_position);
117117
118118 // Unconfirmed system::encode_hash(hash) lexically sorted.
119- BOOST_REQUIRE (encode_hash (out.at (1 ).tx .hash ()) < encode_hash (out.at (2 ).tx .hash ()));
120- BOOST_REQUIRE (encode_hash (out.at (2 ).tx .hash ()) < encode_hash (out.at (3 ).tx .hash ()));
119+ BOOST_CHECK (encode_hash (out.at (0 ).tx .hash ()) < encode_hash (out.at (1 ).tx .hash ()));
120+ BOOST_CHECK (encode_hash (out.at (2 ).tx .hash ()) < encode_hash (out.at (3 ).tx .hash ()));
121121
122122 // Fee (not part of sort).
123- BOOST_REQUIRE_EQUAL (out.at (0 ).fee , floored_subtract ( 0x18u + 0x2au , 0x08u ));
124- BOOST_REQUIRE_EQUAL (out.at (1 ).fee , floored_subtract (0xb1u + 0xb1u , 0xb2u ));
125- BOOST_REQUIRE_EQUAL (out.at (2 ).fee , history::missing_prevout); // spend exceeds value (treated as missing prevout).
126- BOOST_REQUIRE_EQUAL (out.at (3 ).fee , 0u ); // coinbase (archived with null single point).
123+ BOOST_CHECK_EQUAL (out.at (0 ).fee , history::missing_prevout); // spend exceeds value (treated as missing prevout).
124+ BOOST_CHECK_EQUAL (out.at (1 ).fee , floored_subtract (0x18u + 0x2au , 0x08u ));
125+ BOOST_CHECK_EQUAL (out.at (2 ).fee , floored_subtract ( 0xb1u + 0xb1u , 0xb2u ));
126+ BOOST_CHECK_EQUAL (out.at (3 ).fee , 0u ); // coinbase (archived with null single point).
127127}
128128
129129BOOST_AUTO_TEST_CASE (query_address__get_confirmed_history__turbo_block1a_address0__expected)
@@ -229,7 +229,7 @@ BOOST_AUTO_TEST_CASE(query_address__get_history__turbo_block1a_address0__expecte
229229 BOOST_REQUIRE_EQUAL (out.at (4 ).fee , history::missing_prevout); // tx5/tx4
230230 BOOST_REQUIRE_EQUAL (out.at (5 ).fee , floored_subtract (0x18u + 0x2au , 0x08u )); // tx4/tx8
231231 BOOST_REQUIRE_EQUAL (out.at (6 ).fee , floored_subtract (0xb1u + 0xb1u , 0xb2u )); // tx8/tx5
232- BOOST_REQUIRE_EQUAL (out.at (7 ).fee , 0u ); // tx7
232+ BOOST_REQUIRE_EQUAL (out.at (7 ).fee , history::missing_prevout); // tx7
233233}
234234
235235// get_tx_history1
@@ -260,14 +260,14 @@ BOOST_AUTO_TEST_CASE(query_address__get_tx_history__genesis__expected)
260260 const auto hash = test::genesis.transactions_ptr ()->at (0 )->hash (false );
261261 auto history = query.get_tx_history (0 );
262262 BOOST_REQUIRE (history.valid ());
263- BOOST_REQUIRE_EQUAL (history.fee , 0u );
263+ BOOST_REQUIRE_EQUAL (history.fee , history::missing_prevout );
264264 BOOST_REQUIRE_EQUAL (history.position , 0u );
265265 BOOST_REQUIRE_EQUAL (history.tx .height (), 0u );
266266 BOOST_REQUIRE_EQUAL (history.tx .hash (), hash);
267267
268268 history = query.get_tx_history (hash);
269269 BOOST_REQUIRE (history.valid ());
270- BOOST_REQUIRE_EQUAL (history.fee , 0u );
270+ BOOST_REQUIRE_EQUAL (history.fee , history::missing_prevout );
271271 BOOST_REQUIRE_EQUAL (history.position , 0u );
272272 BOOST_REQUIRE_EQUAL (history.tx .height (), 0u );
273273 BOOST_REQUIRE_EQUAL (history.tx .hash (), hash);
0 commit comments