Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1461,11 +1461,14 @@ fi
if test x$use_boost = xyes; then

dnl Check for Boost headers
AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])])
AX_BOOST_BASE([1.73.0],[],[AC_MSG_ERROR([Boost is not available!])])
if test x$want_boost = xno; then
AC_MSG_ERROR([[only libdashconsensus can be built without boost]])
fi

dnl we don't use multi_index serialization
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"

dnl Prevent use of std::unary_function, which was removed in C++17,
dnl and will generate warnings with newer compilers for Boost
dnl older than 1.80.
Expand Down
2 changes: 1 addition & 1 deletion doc/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ These are the dependencies currently used by Dash Core. You can find instruction
| Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) |
| --- | --- | --- | --- | --- | --- |
| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | |
| Boost | [1.81.0](https://www.boost.org/users/download/) | [1.64.0](https://github.com/bitcoin/bitcoin/pull/22320) | No | | |
| Boost | [1.81.0](https://www.boost.org/users/download/) | [1.73.0](https://github.com/bitcoin/bitcoin/pull/29066) | No | | |
| Clang<sup>[ \* ](#note1)</sup> | | [5.0+](https://releases.llvm.org/download.html) (C++17 support) | | | |
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
| FreeType | [2.11.0](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Android only) |
Expand Down
5 changes: 4 additions & 1 deletion src/miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
#include <optional>
#include <stdint.h>

#include <boost/multi_index_container.hpp>
#include <boost/multi_index/identity.hpp>
#include <boost/multi_index/indexed_by.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/tag.hpp>
#include <boost/multi_index_container.hpp>

class BlockManager;
class CBlockIndex;
Expand Down
17 changes: 9 additions & 8 deletions src/test/block_reward_reallocation_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static std::vector<COutPoint> SelectUTXOs(const CChain& active_chain, SimpleUTXO
utoxs.erase(it);
break;
}
BOOST_ASSERT(found);
BOOST_REQUIRE(found);
if (selectedAmount >= amount) {
changeRet = selectedAmount - amount;
break;
Expand Down Expand Up @@ -102,8 +102,8 @@ static void SignTransaction(const CTxMemPool& mempool, CMutableTransaction& tx,
for (auto [i, input] : enumerate(tx.vin)) {
uint256 hashBlock;
CTransactionRef txFrom = GetTransaction(/* block_index */ nullptr, &mempool, input.prevout.hash, Params().GetConsensus(), hashBlock);
BOOST_ASSERT(txFrom);
BOOST_ASSERT(SignSignature(tempKeystore, *txFrom, tx, i, SIGHASH_ALL));
BOOST_REQUIRE(txFrom);
BOOST_REQUIRE(SignSignature(tempKeystore, *txFrom, tx, i, SIGHASH_ALL));
}
}

Expand Down Expand Up @@ -148,7 +148,8 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS

CScript coinbasePubKey = CScript() << ToByteVector(coinbaseKey.GetPubKey()) << OP_CHECKSIG;

BOOST_ASSERT(DeploymentDIP0003Enforced(WITH_LOCK(cs_main, return m_node.chainman->ActiveChain().Height()), consensus_params));
BOOST_REQUIRE(DeploymentDIP0003Enforced(WITH_LOCK(cs_main, return m_node.chainman->ActiveChain().Height()),
consensus_params));

// Register one MN
CKey ownerKey;
Expand All @@ -163,7 +164,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
const CBlockIndex* const tip{m_node.chainman->ActiveChain().Tip()};
dmnman.UpdatedBlockTip(tip);

BOOST_ASSERT(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
BOOST_REQUIRE(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));

BOOST_CHECK_EQUAL(tip->nHeight, 498);
BOOST_CHECK(tip->nHeight < Params().GetConsensus().BRRHeight);
Expand All @@ -176,7 +177,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
const CBlockIndex* const tip{m_node.chainman->ActiveChain().Tip()};
BOOST_CHECK_EQUAL(tip->nHeight, 499);
dmnman.UpdatedBlockTip(tip);
BOOST_ASSERT(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
BOOST_REQUIRE(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
BOOST_CHECK(tip->nHeight < Params().GetConsensus().BRRHeight);
// Creating blocks by different ways
const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey);
Expand All @@ -195,7 +196,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
const CBlockIndex* const tip{m_node.chainman->ActiveChain().Tip()};
BOOST_CHECK_EQUAL(tip->nHeight, Params().GetConsensus().BRRHeight - 1);
dmnman.UpdatedBlockTip(tip);
BOOST_ASSERT(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
BOOST_REQUIRE(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
}

{
Expand All @@ -206,7 +207,7 @@ BOOST_FIXTURE_TEST_CASE(block_reward_reallocation, TestChainBRRBeforeActivationS
const CBlockIndex* const tip{m_node.chainman->ActiveChain().Tip()};
const bool isV20Active{DeploymentActiveAfter(tip, consensus_params, Consensus::DEPLOYMENT_V20)};
dmnman.UpdatedBlockTip(tip);
BOOST_ASSERT(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
BOOST_REQUIRE(dmnman.GetListAtChainTip().HasMN(tx.GetHash()));
const CAmount block_subsidy = GetBlockSubsidyInner(tip->nBits, tip->nHeight, consensus_params, isV20Active);
const CAmount masternode_payment = GetMasternodePayment(tip->nHeight, block_subsidy, isV20Active);
const auto pblocktemplate = BlockAssembler(m_node.chainman->ActiveChainstate(), m_node, *m_node.mempool, Params()).CreateNewBlock(coinbasePubKey);
Expand Down
Loading