-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[CHIA-2827] simplify MempoolManager by removing EligibilityAndAdditions #19801
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
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.
Looks good, left some suggestions.
Pull Request Test Coverage Report for Build 16227671941Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
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.
aok
Purpose:
This simplification is in preparation for another improvement to the mempool dedup feature.
We have the same list of
CoinSpend
s in two different places, once inSpendBundle
and once in the result from running the generatorSpendBundleConditions
. We need to merge the information from both of these (and ensure that they match each other).Current Behavior:
While iterating over
SpendBundleConditions
, build a new dictionary mapping coin ID toEligibilityAndAdditions
.Then iterate over
SpendBundle
and perform lookups in the dictionary.New Behavior:
Build a map of coin ID ->
SpendCondition
.While iterating over
SpendBundle
, look up the corresponding condition from the map.This moves all logic into a single loop.