Skip to content

Commit

Permalink
build, ci: Fix some automatic build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Feb 8, 2024
1 parent 04dc37f commit 89dd533
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
8 changes: 4 additions & 4 deletions ci/test/06_script_b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bash -c "${BASE_ROOT_DIR}/configure --cache-file=config.cache $BITCOIN_CONFIG_AL

make distdir VERSION="$HOST"

cd "${BASE_BUILD_DIR}/bitcoin-$HOST"
cd "${BASE_BUILD_DIR}/blackcoin-$HOST"

bash -c "./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG" || ( (cat config.log) && false)

Expand Down Expand Up @@ -180,18 +180,18 @@ if [ "${RUN_TIDY}" = "true" ]; then
cmake --build /tidy-build --target bitcoin-tidy-tests "$MAKEJOBS"

set -eo pipefail
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/src/"
cd "${BASE_BUILD_DIR}/blackcoin-$HOST/src/"
( run-clang-tidy-"${TIDY_LLVM_V}" -quiet -load="/tidy-build/libbitcoin-tidy.so" "${MAKEJOBS}" ) | grep -C5 "error"
# Filter out files by regex here, because regex may not be
# accepted in src/.bear-tidy-config
# Filter out:
# * qt qrc and moc generated files
jq 'map(select(.file | test("src/qt/qrc_.*\\.cpp$|/moc_.*\\.cpp$") | not))' ../compile_commands.json > tmp.json
mv tmp.json ../compile_commands.json
cd "${BASE_BUILD_DIR}/bitcoin-$HOST/"
cd "${BASE_BUILD_DIR}/blackcoin-$HOST/"
python3 "/include-what-you-use/iwyu_tool.py" \
-p . "${MAKEJOBS}" \
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/bitcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
-- -Xiwyu --cxx17ns -Xiwyu --mapping_file="${BASE_BUILD_DIR}/blackcoin-$HOST/contrib/devtools/iwyu/bitcoin.core.imp" \
-Xiwyu --max_line_length=160 \
2>&1 | tee /tmp/iwyu_ci.out
cd "${BASE_ROOT_DIR}/src"
Expand Down
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ BITCOIN_CORE_H = \
policy/packages.h \
policy/policy.h \
policy/settings.h \
pos.h \
pow.h \
prevector.h \
primitives/block.h \
Expand Down
1 change: 0 additions & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1646,7 +1646,6 @@ bool PeerManagerImpl::ProcessNetBlockHeaders(CNode& pfrom, const std::vector<CBl
bool PeerManagerImpl::ProcessNetBlock(const std::shared_ptr<const CBlock> pblock, bool force_processing, bool min_pow_checked, bool* new_block, CNode& pfrom)
{
PeerRef peer = GetPeerRef(pfrom.GetId());
uint256 hash;
{
LOCK(cs_main);

Expand Down
2 changes: 1 addition & 1 deletion src/primitives/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
#include <hash.h>
#include <script/script.h>
#include <serialize.h>
#include <timedata.h>
#include <tinyformat.h>
#include <uint256.h>
#include <util/strencodings.h>
#include <version.h>

#include <cassert>
#include <stdexcept>
#include <timedata.h>

std::string COutPoint::ToString() const
{
Expand Down
13 changes: 9 additions & 4 deletions src/txmempool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,11 @@ void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<COutPoint>* pvNoSpendsRemaining) {
AssertLockHeld(cs);

unsigned nTxnRemoved = 0;
/*
// Blackcoin
// CFeeRate maxFeeRateRemoved(0);
unsigned nTxnRemoved = 0;
CFeeRate maxFeeRateRemoved(0);
*/
while (!mapTx.empty() && DynamicMemoryUsage() > sizelimit) {
indexed_transaction_set::index<descendant_score>::type::iterator it = mapTx.get<descendant_score>().begin();

Expand All @@ -1156,16 +1158,19 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<COutPoint>* pvNoSpends
// to have 0 fee). This way, we don't allow txn to enter mempool with feerate
// equal to txn which were removed with no block in between.
CFeeRate removed(it->GetModFeesWithDescendants(), it->GetSizeWithDescendants());
// Blackcoin
/*
// Blackcoin
removed += m_incremental_relay_feerate;
trackPackageRemoved(removed);
maxFeeRateRemoved = std::max(maxFeeRateRemoved, removed);
*/

setEntries stage;
CalculateDescendants(mapTx.project<0>(it), stage);
/*
// Blackcoin
nTxnRemoved += stage.size();
*/

std::vector<CTransaction> txn;
if (pvNoSpendsRemaining) {
Expand All @@ -1184,8 +1189,8 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<COutPoint>* pvNoSpends
}
}

// Blackcoin
/*
// Blackcoin
if (maxFeeRateRemoved > CFeeRate(0)) {
LogPrint(BCLog::MEMPOOL, "Removed %u txn, rolling minimum fee bumped to %s\n", nTxnRemoved, maxFeeRateRemoved.ToString());
}
Expand Down
3 changes: 3 additions & 0 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ const std::vector<std::string> CHECKLEVEL_DOC {
* expect to see in regular mainnet reorgs, but not so high that it would
* noticeably interfere with the pruning mechanism.
* */
/*
// Blackcoin
static constexpr int PRUNE_LOCK_BUFFER{10};
*/

GlobalMutex g_best_block_mutex;
std::condition_variable g_best_block_cv;
Expand Down

0 comments on commit 89dd533

Please sign in to comment.