-
Notifications
You must be signed in to change notification settings - Fork 38.8k
bench: remove from available_coins with reference, vout size #24975
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
Conversation
|
See also #23693 |
|
With this change but without the |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
|
Rebased since MempoolCheck no longer relies on the coin creation |
|
cc @glozow |
|
unfortunately don't have time to work on this, lmk if i should close it |
glozow
left a comment
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.
Agree these are correct bug fixes. It's unclear to me why #22856, but not this, has the underflow problem?
unless changing the ComplexMempool bench should instead be using something like PopulateMempool with "real" coins?
This function and PopulateMempool are quite similar. If PopulateMempool creates equally complex graphs of transactions, yeah, it probably makes sense to switch it over.
Closing as Up For Grabs. |
In the current mempool benchmarks, the coins were not being deleted from
available_coinssinceAvailablerather thanAvailable&was used. Also the lack of the reference meant thatcoin.vin_left++only incremented the copy's variable rather than the one in the vector. The removal condition previously compared the coin'svin.size()tovin_left, when it should have been usingvout.size(). I changed theMempoolCheckbench to instead usemin_ancestorsof 1 rather than 5 as otherwise an underflow could occur when callingcoin.ref->vout.size() - coin.vin_left. This previously did not occur sincevin_leftwas always 0 since a copy of the coin was used. Using 1 vs 5 shouldn't give too much of a difference since the test can still generate more than 1 (or 5) ancestors.