Skip to content

Commit a26fccf

Browse files
committed
Use require on bool actions in test.
1 parent f7b6f62 commit a26fccf

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

test/protocols/electrum/electrum_outputs.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ BOOST_AUTO_TEST_CASE(electrum__blockchain_utxo_get_address__p2kh__expected)
9292
BOOST_REQUIRE(handshake(electrum::version::v1_0));
9393

9494
// Add a confirmed p2sh/p2kh block.
95-
query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false);
96-
query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false);
95+
BOOST_REQUIRE(query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false));
96+
BOOST_REQUIRE(query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false));
9797

9898
const auto hash = test::bogus_block10.transactions_ptr()->at(1)->hash(false);
9999
const auto request = R"({"id":901,"method":"blockchain.utxo.get_address","params":["%1%",0]})" "\n";
@@ -109,8 +109,8 @@ BOOST_AUTO_TEST_CASE(electrum__blockchain_utxo_get_address__p2sh__expected)
109109
BOOST_REQUIRE(handshake(electrum::version::v1_0));
110110

111111
// Add a confirmed p2sh/p2kh block.
112-
query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false);
113-
query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false);
112+
BOOST_REQUIRE(query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false));
113+
BOOST_REQUIRE(query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false));
114114

115115
const auto hash = test::bogus_block10.transactions_ptr()->at(1)->hash(false);
116116
const auto request = R"({"id":901,"method":"blockchain.utxo.get_address","params":["%1%",1]})" "\n";

test/protocols/electrum/electrum_transactions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ BOOST_AUTO_TEST_CASE(electrum__blockchain_transaction_get_merkle__mutiple_txs_bl
367367
const auto tx2_hash = tx2.hash(false);
368368

369369
// Add a confirmed multi-tx block.
370-
query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false);
371-
query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false);
370+
BOOST_REQUIRE(query_.set(test::bogus_block10, database::context{ 0, 10, 0 }, false, false));
371+
BOOST_REQUIRE(query_.push_confirmed(query_.to_header(test::bogus_block10.hash()), false));
372372

373373
const auto request = R"({"id":104,"method":"blockchain.transaction.get_merkle","params":["%1%",10]})" "\n";
374374
const auto response = get((boost::format(request) % encode_hash(tx1_hash)).str());

0 commit comments

Comments
 (0)