-
Notifications
You must be signed in to change notification settings - Fork 12
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
wallet: drop change to fee if amount is less than dust #32
wallet: drop change to fee if amount is less than dust #32
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.
Can we add a test
Yes. I'll fix the lint and add a test in the next force push. |
Force pushed:
|
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.
will continue reviewing after you make these changes
293ad9c
to
3c1983e
Compare
Force pushed 3c1983e addressing requested changes. |
3c1983e
to
a9cf64d
Compare
Force pushed a9cf64d refactoring the unit test and creating random |
a9cf64d
to
b498b19
Compare
b498b19
to
0e8a816
Compare
Force pushed 0e8a816, which changed the random data into constant values.
|
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.
I think this should be the final set of changes required before merging. Nice work and thanks for your contribution.
0e8a816
to
ed44b85
Compare
Force pushed ed44b85
|
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 ed44b85. Lets also wait for @theanmolsharma's approval
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.
I think we can merge after the comments are addressed.
ed44b85
to
4589fff
Compare
Force pushed 4589fff addressing reviews and rebasing to the main. |
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.
One last nit and then I'll merge. (Ik I've been saying this for the past 3 reviews, but I promise to merge after this)
Awesome work @Ayush170-Future
4589fff
to
fd24269
Compare
Done!! Addressed the |
fd24269
to
991c16d
Compare
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 991c16d
@Ayush170-Future you need to sign the commits so that we can merge. I've enabled branch protection rules that only allow signed commits to be merged in main. It's a good FOSS practice to sign commits. Some helpful links: |
Yes, please sign the commits in this PR, and thanks for letting me know, I'll set it up and sign my commits from now on. |
This commit refactors the CoinSelector class to properly handle the calculation of change cost. The change amount is now checked against the cost of change, and if the change is less than the cost, the cost is added to the transaction fee. This ensures that the transaction output is correctly adjusted based on the current fee rate and the size of the change output.
991c16d
to
2d88828
Compare
This commit refactors the
CoinSelector's
select()
method to properly handle the calculation of change cost. The change amount is now checked against the cost of change, and if the change is less than the cost, the cost is added to the transaction fee. Additionally, it adds a unit test for theCoinSelector
.Fixes: Issue #26