diff --git a/.github/ISSUE_TEMPLATE/good_first_issue.yml b/.github/ISSUE_TEMPLATE/good_first_issue.yml index a13cc4bafe25..6246956c3ae5 100644 --- a/.github/ISSUE_TEMPLATE/good_first_issue.yml +++ b/.github/ISSUE_TEMPLATE/good_first_issue.yml @@ -29,8 +29,10 @@ body: attributes: label: Useful Skills description: For example, “`std::thread`”, “Qt5 GUI and async GUI design” or “basic understanding of Dash masternodes and the Dash Core RPC interface”. - validations: - required: false + value: | + * Compiling Dash Core from source + * Running the C++ unit tests and the Python functional tests + * ... - type: textarea attributes: label: Guidance for new contributors diff --git a/doc/release-notes-27460.md b/doc/release-notes-27460.md new file mode 100644 index 000000000000..bc29e2d3779e --- /dev/null +++ b/doc/release-notes-27460.md @@ -0,0 +1,7 @@ +- A new `importmempool` RPC has been added. It loads a valid `mempool.dat` file and attempts to + add its contents to the mempool. This can be useful to import mempool data from another node + without having to modify the datadir contents and without having to restart the node. (#8071) + - Warning: Importing untrusted files is dangerous, especially if metadata from the file is taken over. + - If you want to apply fee deltas, it is recommended to use the `getprioritisedtransactions` and + `prioritisetransaction` RPCs instead of the `apply_fee_delta_priority` option to avoid + double-prioritising any already-prioritised transactions in the mempool. diff --git a/src/Makefile.am b/src/Makefile.am index e6684ec9c2ae..c728766fb564 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -311,6 +311,7 @@ BITCOIN_CORE_H = \ kernel/mempool_limits.h \ kernel/mempool_options.h \ kernel/mempool_persist.h \ + kernel/mempool_removal_reason.h \ kernel/notifications_interface.h \ kernel/validation_cache_sizes.h \ key.h \ @@ -618,6 +619,7 @@ libbitcoin_node_a_SOURCES = \ kernel/cs_main.cpp \ kernel/disconnected_transactions.cpp \ kernel/mempool_persist.cpp \ + kernel/mempool_removal_reason.cpp \ llmq/blockprocessor.cpp \ llmq/commitment.cpp \ llmq/context.cpp \ @@ -1342,6 +1344,7 @@ libdashkernel_la_SOURCES = \ kernel/cs_main.cpp \ kernel/disconnected_transactions.cpp \ kernel/mempool_persist.cpp \ + kernel/mempool_removal_reason.cpp \ key.cpp \ key_io.cpp \ llmq/blockprocessor.cpp \ diff --git a/src/Makefile.test.include b/src/Makefile.test.include index efc9a88fcfc3..a2194169c846 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -490,8 +490,9 @@ endif %.json.h: %.json @$(MKDIR_P) $(@D) $(AM_V_GEN) { \ + echo "#include " && \ echo "namespace json_tests{" && \ - echo "static unsigned const char $(*F)[] = {" && \ - $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \ + echo "static const std::string $(*F){" && \ + $(HEXDUMP) -v -e '8/1 "char(0x%02x), "' -e '"\n"' $< | $(SED) -e 's/char(0x ),//g' && \ echo "};};"; \ } > "$@.new" && mv -f "$@.new" "$@" diff --git a/src/bench/net_processing.cpp b/src/bench/net_processing.cpp index cdb9b671d2be..ba78bf0f0f7d 100644 --- a/src/bench/net_processing.cpp +++ b/src/bench/net_processing.cpp @@ -15,8 +15,8 @@ using namespace std::literals; static void InventoryBatch(benchmark::Bench& bench, uint32_t count) { const auto setup = MakeNoLogFileContext(ChainType::REGTEST); - auto& chainstate = *static_cast(&setup->m_node.chainman->ActiveChainstate()); - chainstate.JumpOutOfIbd(); + auto& chainman = static_cast(*setup->m_node.chainman); + chainman.JumpOutOfIbd(); auto& peerman = *setup->m_node.peerman; const auto& connman = *static_cast(setup->m_node.connman.get()); auto peer{MakeTestPeer(/*id=*/0)}; @@ -44,7 +44,7 @@ static void InventoryBatch(benchmark::Bench& bench, uint32_t count) }); peerman.FinalizeNode(*peer); - chainstate.ResetIbd(); + chainman.ResetIbd(); SetMockTime(0s); } diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index e8dc69795298..884cc872e318 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -182,7 +182,7 @@ int main(int argc, char* argv[]) << "\t" << "Reindexing: " << std::boolalpha << node::fReindex.load() << std::noboolalpha << std::endl << "\t" << "Snapshot Active: " << std::boolalpha << chainman.IsSnapshotActive() << std::noboolalpha << std::endl << "\t" << "Active Height: " << chainman.ActiveHeight() << std::endl - << "\t" << "Active IBD: " << std::boolalpha << chainman.ActiveChainstate().IsInitialBlockDownload() << std::noboolalpha << std::endl; + << "\t" << "Active IBD: " << std::boolalpha << chainman.IsInitialBlockDownload() << std::noboolalpha << std::endl; CBlockIndex* tip = chainman.ActiveTip(); if (tip) { std::cout << "\t" << tip->ToString() << std::endl; diff --git a/src/blockfilter.cpp b/src/blockfilter.cpp index 496ec24fd2a5..f256d81f39ee 100644 --- a/src/blockfilter.cpp +++ b/src/blockfilter.cpp @@ -9,9 +9,11 @@ #include #include #include +#include #include #include