The same was done for another struct in e177fcab3831b6d259da5164cabedcc9e78f6957.
Also, change type of feeDelta from int64_t to CAmount.
The same was done for another struct in e177fcab3831b6d259da5164cabedcc9e78f6957.
Also, change type of feeDelta from int64_t to CAmount.
Concept ACK.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
130 | @@ -131,7 +131,7 @@ class CTxMemPoolEntry 131 | std::chrono::seconds GetTime() const { return std::chrono::seconds{nTime}; } 132 | unsigned int GetHeight() const { return entryHeight; } 133 | int64_t GetSigOpCost() const { return sigOpCost; } 134 | - int64_t GetModifiedFee() const { return nFee + feeDelta; } 135 | + CAmount GetModifiedFee() const { return nFee + feeDelta; }
Also suggesting to add:
--- a/src/node/miner.h
+++ b/src/node/miner.h
@@ -45,7 +45,7 @@ struct CTxMemPoolModifiedEntry {
nSigOpCostWithAncestors = entry->GetSigOpCostWithAncestors();
}
- int64_t GetModifiedFee() const { return iter->GetModifiedFee(); }
+ CAmount GetModifiedFee() const { return iter->GetModifiedFee(); }
uint64_t GetSizeWithAncestors() const { return nSizeWithAncestors; }
CAmount GetModFeesWithAncestors() const { return nModFeesWithAncestors; }
size_t GetTxSize() const { return iter->GetTxSize(); }
Thx, done
ACK fa131d3630bb8da6816e50a9a37c0ed4ad4ee33c, I have reviewed the code.
re-ACK fa84a49526fcf76e98b0b2f4d4b00b34a8dddf46
Code review ACK fa84a49526fcf76e98b0b2f4d4b00b34a8dddf46.
Feel free to pull https://github.com/MarcoFalke/bitcoin-core/compare/2203-refactor-fee-delta-%F0%9F%94%B6...promag:2203-refactor-fee-delta-%F0%9F%94%B6
https://github.com/promag/bitcoin/commit/b440b03845410c2892f73497f774d29e897caed7 https://github.com/promag/bitcoin/commit/c5cdfe56de13fefb56f90d1af2f7912b0c19f1a6
I didn't touch the other structs, as they take multiple arguments. I think before touching them, we should ideally decide whether to use designated initializers or clang-tidy named arguments.
Concept ACK, haven't reviewed code