Skip to content

Commit 5fb9455

Browse files
committed
Merge bitcoin#31058: refactor: include the proper header rather than forward-declaring RemovalReasonToString
ca2e4ba refactor: include the proper header rather than forward-declaring RemovalReasonToString (Cory Fields) Pull request description: Trivial no-op fixup. This was pointed out by bitcoin#31053, which causes the include order to be shuffled around: ``` [21:49:26.130] /ci_container_base/src/validationinterface.cpp:22:13: error: redundant 'RemovalReasonToString' declaration [readability-redundant-declaration,-warnings-as-errors] [21:49:26.130] 22 | std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept; [21:49:26.130] | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [21:49:26.130] /ci_container_base/src/kernel/mempool_removal_reason.h:22:13: note: previously declared here [21:49:26.130] 22 | std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept; [21:49:26.130] | ^ ``` I don't see any reason why the include shouldn't just be used. ACKs for top commit: maflcko: lgtm ACK ca2e4ba hebasto: ACK ca2e4ba, IWYU seems [agree](https://cirrus-ci.com/task/6170839912022016): TheCharlatan: ACK ca2e4ba Tree-SHA512: e3584cae4f50bf2bc6c824bfaddfe683ef6a17d16138d0cbcc544b98bd64d5d7353b0826b1e8cf16e12410e27b0fcedde27100d4241b7cc194cd4465c8175a5b
2 parents e569eb8 + ca2e4ba commit 5fb9455

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/validationinterface.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <consensus/validation.h>
1010
#include <kernel/chain.h>
1111
#include <kernel/mempool_entry.h>
12+
#include <kernel/mempool_removal_reason.h>
1213
#include <logging.h>
1314
#include <primitives/block.h>
1415
#include <primitives/transaction.h>
@@ -19,8 +20,6 @@
1920
#include <unordered_map>
2021
#include <utility>
2122

22-
std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept;
23-
2423
/**
2524
* ValidationSignalsImpl manages a list of shared_ptr<CValidationInterface> callbacks.
2625
*

0 commit comments

Comments
 (0)