Skip to content

Commit

Permalink
Test using prvalues vs. lvalue or temporary.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 11, 2024
1 parent dcef21c commit 871f628
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/bitcoin/database/impl/query/archive.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ inline bool CLASS::is_malleated64(const block& block) const NOEXCEPT

// Pass l-value to iterator.
// block.get_hash() assumes cached or is not thread safe.
const auto link = to_header(block.get_hash());
auto it = store_.txs.it(link);
////const auto link = to_header(block.get_hash());
auto it = store_.txs.it(to_header(block.get_hash()));
if (!it)
return false;

Expand Down
4 changes: 2 additions & 2 deletions test/query/validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ BOOST_AUTO_TEST_CASE(query_validate__get_tx_state__connected_in_context__tx_conn
BOOST_REQUIRE(query.set_tx_connected(2, { 1, 5, 9 }, 15, 16));
BOOST_REQUIRE(query.set_tx_connected(2, { 2, 6, 0 }, 17, 18));
BOOST_REQUIRE(query.set_tx_connected(3, ctx, 19, 20));
BOOST_REQUIRE_EQUAL(query.get_tx_state(2, ctx), error::tx_connected);
BOOST_REQUIRE_EQUAL(query.get_tx_state(fee, sigops, 2, ctx), error::tx_connected);
BOOST_REQUIRE_EQUAL(query.get_tx_state(tx_link{ 2 }, ctx), error::tx_connected);
BOOST_REQUIRE_EQUAL(query.get_tx_state(fee, sigops, tx_link{ 2 }, ctx), error::tx_connected);
BOOST_REQUIRE_EQUAL(fee, expected_fee);
BOOST_REQUIRE_EQUAL(sigops, expected_sigops);
}
Expand Down

0 comments on commit 871f628

Please sign in to comment.