Skip to content

Commit 361a0c0

Browse files
committed
Merge bitcoin/bitcoin#27783: Add public Boost headers explicitly
2484cac Add public Boost headers explicitly (Hennadii Stepanov) fade2ad test: Avoid `BOOST_ASSERT` macro (Hennadii Stepanov) Pull request description: To check symbols in the code base, run: ``` git grep boost::multi_index::identity git grep boost::multi_index::indexed_by git grep boost::multi_index::tag git grep boost::make_tuple ``` Hoping on the absence of conflicts with top-prio PRs :) ACKs for top commit: MarcoFalke: lgtm ACK 2484cac TheCharlatan: ACK 2484cac Tree-SHA512: d122ab028eee76ee1c4609ed51ec8db0c8c768edcc2ff2c0e420a48e051aa71e99748cdb5d22985ae6d97c808c77c1a27561f0715f77b256f74c1c310b37694c
2 parents 6f5f37e + 2484cac commit 361a0c0

File tree

8 files changed

+22
-8
lines changed

8 files changed

+22
-8
lines changed

src/node/miner.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
#include <optional>
1515
#include <stdint.h>
1616

17+
#include <boost/multi_index/identity.hpp>
18+
#include <boost/multi_index/indexed_by.hpp>
1719
#include <boost/multi_index/ordered_index.hpp>
20+
#include <boost/multi_index/tag.hpp>
1821
#include <boost/multi_index_container.hpp>
1922

2023
class ArgsManager;

src/txmempool.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@
3333
#include <util/result.h>
3434

3535
#include <boost/multi_index/hashed_index.hpp>
36+
#include <boost/multi_index/identity.hpp>
37+
#include <boost/multi_index/indexed_by.hpp>
3638
#include <boost/multi_index/ordered_index.hpp>
3739
#include <boost/multi_index/sequenced_index.hpp>
40+
#include <boost/multi_index/tag.hpp>
3841
#include <boost/multi_index_container.hpp>
3942

4043
class CBlockIndex;

src/txrequest.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@
1010
#include <random.h>
1111
#include <uint256.h>
1212

13-
#include <boost/multi_index_container.hpp>
13+
#include <boost/multi_index/indexed_by.hpp>
1414
#include <boost/multi_index/ordered_index.hpp>
15+
#include <boost/multi_index/sequenced_index.hpp>
16+
#include <boost/multi_index/tag.hpp>
17+
#include <boost/multi_index_container.hpp>
18+
#include <boost/tuple/tuple.hpp>
1519

1620
#include <chrono>
1721
#include <unordered_map>

src/wallet/test/coinselector_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
432432
CAmount selection_target = 16 * CENT;
433433
const auto& no_res = SelectCoinsBnB(GroupCoins(available_coins.All(), /*subtract_fee_outputs*/true),
434434
selection_target, /*cost_of_change=*/0, MAX_STANDARD_TX_WEIGHT);
435-
BOOST_ASSERT(!no_res);
435+
BOOST_REQUIRE(!no_res);
436436
BOOST_CHECK(util::ErrorString(no_res).original.find("The inputs size exceeds the maximum weight") != std::string::npos);
437437

438438
// Now add same coin value with a good size and check that it gets selected

src/wallet/test/wallet_tests.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,11 +938,10 @@ BOOST_FIXTURE_TEST_CASE(wallet_sync_tx_invalid_state_test, TestingSetup)
938938
}
939939

940940
// Add tx to wallet
941-
const auto& op_dest = wallet.GetNewDestination(OutputType::BECH32M, "");
942-
BOOST_ASSERT(op_dest);
941+
const auto op_dest{*Assert(wallet.GetNewDestination(OutputType::BECH32M, ""))};
943942

944943
CMutableTransaction mtx;
945-
mtx.vout.push_back({COIN, GetScriptForDestination(*op_dest)});
944+
mtx.vout.push_back({COIN, GetScriptForDestination(op_dest)});
946945
mtx.vin.push_back(CTxIn(g_insecure_rand_ctx.rand256(), 0));
947946
const auto& tx_id_to_spend = wallet.AddToWallet(MakeTransactionRef(mtx), TxStateInMempool{})->GetHash();
948947

src/wallet/test/walletdb_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(walletdb_read_write_deadlock)
3939
DatabaseStatus status;
4040
bilingual_str error_string;
4141
std::unique_ptr<WalletDatabase> db = MakeDatabase(m_path_root / strprintf("wallet_%d_.dat", db_format).c_str(), options, status, error_string);
42-
BOOST_ASSERT(status == DatabaseStatus::SUCCESS);
42+
BOOST_CHECK_EQUAL(status, DatabaseStatus::SUCCESS);
4343

4444
std::shared_ptr<CWallet> wallet(new CWallet(m_node.chain.get(), "", std::move(db)));
4545
wallet->m_keypool_size = 4;

src/wallet/test/walletload_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ BOOST_FIXTURE_TEST_CASE(wallet_load_ckey, TestingSetup)
169169
// Fourth test case:
170170
// Verify that loading up a 'ckey' with an invalid pubkey throws an error
171171
CPubKey invalid_key;
172-
BOOST_ASSERT(!invalid_key.IsValid());
172+
BOOST_CHECK(!invalid_key.IsValid());
173173
SerializeData key = MakeSerializeData(DBKeys::CRYPTED_KEY, invalid_key);
174174
records[key] = ckey_record_value;
175175

test/lint/lint-includes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,20 @@
2323

2424
EXPECTED_BOOST_INCLUDES = ["boost/date_time/posix_time/posix_time.hpp",
2525
"boost/multi_index/hashed_index.hpp",
26+
"boost/multi_index/identity.hpp",
27+
"boost/multi_index/indexed_by.hpp",
2628
"boost/multi_index/ordered_index.hpp",
2729
"boost/multi_index/sequenced_index.hpp",
30+
"boost/multi_index/tag.hpp",
2831
"boost/multi_index_container.hpp",
2932
"boost/process.hpp",
3033
"boost/signals2/connection.hpp",
3134
"boost/signals2/optional_last_value.hpp",
3235
"boost/signals2/signal.hpp",
3336
"boost/test/included/unit_test.hpp",
34-
"boost/test/unit_test.hpp"]
37+
"boost/test/unit_test.hpp",
38+
"boost/tuple/tuple.hpp",
39+
]
3540

3641

3742
def get_toplevel():

0 commit comments

Comments
 (0)