Merge bitcoin/bitcoin#31058: refactor: include the proper header rather than forward-declaring RemovalReasonToString

ca2e4ba352 refactor: include the proper header rather than forward-declaring RemovalReasonToString (Cory Fields)

Pull request description:

  Trivial no-op fixup.

  This was pointed out by #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 ca2e4ba352
  hebasto:
    ACK ca2e4ba352, IWYU seems [agree](https://cirrus-ci.com/task/6170839912022016):
  TheCharlatan:
    ACK ca2e4ba352

Tree-SHA512: e3584cae4f50bf2bc6c824bfaddfe683ef6a17d16138d0cbcc544b98bd64d5d7353b0826b1e8cf16e12410e27b0fcedde27100d4241b7cc194cd4465c8175a5b
This commit is contained in:
merge-script 2024-10-09 10:08:50 +01:00
commit 5fb9455063
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -9,6 +9,7 @@
#include <consensus/validation.h>
#include <kernel/chain.h>
#include <kernel/mempool_entry.h>
#include <kernel/mempool_removal_reason.h>
#include <logging.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
@ -19,8 +20,6 @@
#include <unordered_map>
#include <utility>
std::string RemovalReasonToString(const MemPoolRemovalReason& r) noexcept;
/**
* ValidationSignalsImpl manages a list of shared_ptr<CValidationInterface> callbacks.
*