-
Notifications
You must be signed in to change notification settings - Fork 37.7k
29242 Diagram check followups #29724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
29242 Diagram check followups #29724
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, 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. |
4cfb540
to
252af7b
Compare
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for taking my test nits. I haven't run the package_rbf fuzzer with changes yet. Will review again after rebase.
src/util/feefrac.h
Outdated
inline FeeFrac& operator=(const FeeFrac&) noexcept = default; | ||
|
||
/** Check if this is empty (size and fee are 0). */ | ||
bool inline IsEmpty() const noexcept { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit (feel free to ignore): Member functions are already inline
, so could drop the inline
everywhere. See https://en.cppreference.com/w/cpp/language/inline
A function defined entirely inside a class/struct/union definition, whether it's a member function or a non-member friend function, is implicitly an inline function ...
252af7b
to
cebcced
Compare
rebased on master, ready for more review |
|
de3af5f
to
ee1b9b2
Compare
🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the Possibly this is due to a silent merge conflict (the changes in this pull request being Leave a comment here, if you need help tracking down a confusing failure. |
fixed, thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK ee1b9b2, reviewed the changes and package_rbf fuzzer seems to run fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crACK ee1b9b2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK ee1b9b2
I've tested this locally but havent run the fuzz test.
Feel free to ignore the review comments below, mostly style nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: commit is not really a spelling mistake but grammar fix
"ImprovesFeerateDiagram: doc fix and removal of unused diagram vectors"
@@ -67,6 +98,20 @@ static CTransactionRef add_descendant_to_parents(const std::vector<CTransactionR | |||
return child_tx; | |||
} | |||
|
|||
// Makes two children for a single parent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: code is self explanatory
// Makes two children for a single parent |
@@ -67,6 +98,20 @@ static CTransactionRef add_descendant_to_parents(const std::vector<CTransactionR | |||
return child_tx; | |||
} | |||
|
|||
// Makes two children for a single parent | |||
static std::pair<CTransactionRef, CTransactionRef> add_children_to_parent(const CTransactionRef parent, CTxMemPool& pool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
static std::pair<CTransactionRef, CTransactionRef> add_children_to_parent(const CTransactionRef parent, CTxMemPool& pool) | |
static std::pair<CTransactionRef, CTransactionRef> add_two_children_to_parent(const CTransactionRef parent, CTxMemPool& pool) |
@@ -116,6 +161,10 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup) | |||
const auto tx12 = make_tx(/*inputs=*/ {m_coinbase_txns[8]}, /*output_values=*/ {995 * CENT}); | |||
pool.addUnchecked(entry.Fee(normal_fee).FromTx(tx12)); | |||
|
|||
// Will make two children of this single parent | |||
const auto tx13 = make_tx(/*inputs=*/ {m_coinbase_txns[9]}, /*output_values=*/ {995 * CENT, 995 * CENT}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit
const auto tx13 = make_tx(/*inputs=*/ {m_coinbase_txns[9]}, /*output_values=*/ {995 * CENT, 995 * CENT}); | |
const auto tx13 = make_tx(/*inputs=*/{m_coinbase_txns[9]}, /*output_values=*/{995 * CENT, 995 * CENT}); |
const auto entry_sibling_2 = pool.GetIter(two_siblings.second->GetHash()).value(); | ||
BOOST_CHECK_EQUAL(pool.CheckConflictTopology({entry_sibling_1}).value(), strprintf("%s is not the only child of parent %s", entry_sibling_1->GetSharedTx()->GetHash().ToString(), entry13_unchained->GetSharedTx()->GetHash().ToString())); | ||
BOOST_CHECK_EQUAL(pool.CheckConflictTopology({entry_sibling_2}).value(), strprintf("%s is not the only child of parent %s", entry_sibling_2->GetSharedTx()->GetHash().ToString(), entry13_unchained->GetSharedTx()->GetHash().ToString())); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: trailing line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK ee1b9b2
Amendments look good to me.
@ismaelsadeeq I'll consider these if I have to touch again |
Follow-ups to #29242