Skip to content

Commit

Permalink
Merge bitcoin#31058: refactor: include the proper header rather than …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
fanquake committed Oct 9, 2024
2 parents e569eb8 + ca2e4ba commit 5fb9455
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/validationinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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.
*
Expand Down

0 comments on commit 5fb9455

Please sign in to comment.