-
Notifications
You must be signed in to change notification settings - Fork 38.7k
wallet: sum ancestors rather than taking max in output groups #13812
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
sdaftuar
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.
utACK apart from the comment nit, thanks for addressing.
src/wallet/coinselection.cpp
Outdated
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.
Perhaps you could update the comment to explain that this calculation will generally be overestimating the number of ancestors of a group (eg when two coins share a common ancestor)? Otherwise a future reader might be confused about the correctness of this calculation.
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.
How about now?
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, thanks!
b9a689c to
23fbbb1
Compare
|
utACK 23fbbb1 |
|
utACK |
|
makes sense |
…groups 23fbbb1 wallet: sum ancestors rather than taking max in output groups (Karl-Johan Alm) Pull request description: This is pointed out in #12257 (comment). Basically, the ancestors gives an indication as to how many ancestors the resulting transaction will have, which is more precise when summing up the values, rather than taking the maximum, since all the coins in the group will become ancestors if selected. Tree-SHA512: 0588c4b6059669650614817e041526a2ab89dda8c07fca8e077c7669dca1fed51cd164f7df56340840ab60285d48f3b140dcee64f64bf696b2dd4ab16d556a13
…output groups 23fbbb1 wallet: sum ancestors rather than taking max in output groups (Karl-Johan Alm) Pull request description: This is pointed out in bitcoin#12257 (comment). Basically, the ancestors gives an indication as to how many ancestors the resulting transaction will have, which is more precise when summing up the values, rather than taking the maximum, since all the coins in the group will become ancestors if selected. Tree-SHA512: 0588c4b6059669650614817e041526a2ab89dda8c07fca8e077c7669dca1fed51cd164f7df56340840ab60285d48f3b140dcee64f64bf696b2dd4ab16d556a13
…output groups 23fbbb1 wallet: sum ancestors rather than taking max in output groups (Karl-Johan Alm) Pull request description: This is pointed out in bitcoin#12257 (comment). Basically, the ancestors gives an indication as to how many ancestors the resulting transaction will have, which is more precise when summing up the values, rather than taking the maximum, since all the coins in the group will become ancestors if selected. Tree-SHA512: 0588c4b6059669650614817e041526a2ab89dda8c07fca8e077c7669dca1fed51cd164f7df56340840ab60285d48f3b140dcee64f64bf696b2dd4ab16d556a13
This is pointed out in #12257 (comment).
Basically, the ancestors gives an indication as to how many ancestors the resulting transaction will have, which is more precise when summing up the values, rather than taking the maximum, since all the coins in the group will become ancestors if selected.