refactor: rename fees.{h,cpp}
to fees/block_policy_estimator{h,cpp}
#33218
+39
−36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a simple refactoring that does four things:
test/policy_fee_tests.cpp
totest/feerounder_tests.cpp
.policy/fees.{h,cpp}
topolicy/fees/block_policy_estimator.{h,cpp}
.policy/fees_args.cpp
topolicy/fees/block_policy_estimator_args.cpp
.estimateSmartFee
to return the block height at which the estimate was made by adding abest_height
unsigned int value to theFeeCalculation
struct.Motivation
In preparation for adding a new fee estimator, the
fees
directory is created so we can organize code intoblock_policy_estimator
andmempool
becausea) It would be clunky to add more code directly under
fees
.b) Having
policy/fees.{h,cpp}
andpolicy/mempool.{h,cpp}
would also be undesirable.Therefore, it makes sense to structure the it as
policy/fees/block_policy_estimator
,policy/fees/mempool
, etc.Hence test file were also updated accordingly.
The current block height is also returned because later in #30157 we log the height at which each estimate is made (at the debug log category of fee estimation :) ). This feature is particularly useful for empirical data analysis.