This repository was archived by the owner on Jul 20, 2021. It is now read-only.
hub/sweep_service: optimize bundle - #185
Open
tsvisabo wants to merge 6 commits into
Open
Conversation
th0br0
suggested changes
Aug 5, 2018
| std::vector<db::TransferInput> minimalVecOfInputs; | ||
| getVecOfMinSizeWithSumNotLessThan(missing, hubInputs, | ||
| minimalVecOfInputs); | ||
| hubInputs.swap(minimalVecOfInputs); |
Contributor
There was a problem hiding this comment.
You also need to amend hubInputTotal as this could vary (required for remainder calculation)
Contributor
There was a problem hiding this comment.
Still missing the change here
Contributor
There was a problem hiding this comment.
hubInputTotal needs to be adjusted with the sum of minimalVecOfInputs.balance.
This is relevant for the remainder on l310
tsvisabo
force-pushed
the
sweep_service_opt_bundle
branch
from
August 5, 2018 14:21
3ff0d1e to
60cd46a
Compare
th0br0
suggested changes
Aug 5, 2018
| /// @param[in] olderThan - the cutoff point in time | ||
| /// @return std::vector - a list of TransferInput | ||
| virtual std::vector<TransferInput> getHubInputsForSweep( | ||
| uint64_t requiredAmount, |
Contributor
There was a problem hiding this comment.
Could we also rename the method to availableHubInputs or similar?
| std::vector<db::TransferInput> minimalVecOfInputs; | ||
| getVecOfMinSizeWithSumNotLessThan(missing, hubInputs, | ||
| minimalVecOfInputs); | ||
| hubInputs.swap(minimalVecOfInputs); |
Contributor
There was a problem hiding this comment.
Still missing the change here
…from db query as it is not necessary
…t address as a change address\nso it will be more likely to be picked the next time, (avoid fragmentation)
tsvisabo
force-pushed
the
sweep_service_opt_bundle
branch
from
August 5, 2018 19:42
fdd5106 to
3453aeb
Compare
…t address as a change address\nso it will be more likely to be picked the next time, (avoid fragmentation)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Add new function+call in sweep service to compose a bundle from the minimum number of inputs possible so we don't get a huge bundle
Type of change
How Has This Been Tested?
Checklist:
Please delete items that are not relevant.