Conversation
src/ga_tx.cpp
Outdated
| // No need for implicit change output | ||
| continue; | ||
| } | ||
|
|
There was a problem hiding this comment.
At 792 we should add the dust to an explicit change output if there is one.
I think we also need a check that if any outputs are marked is_change then the tx has no added change output already.
There was a problem hiding this comment.
I've moved this logic around a bit so that now any dust will be added to the greedy addressee before being considered for change.
Logic should be such that there won't be a change output if there is a greedy one.
5f678ac to
8d74316
Compare
5b57e2c to
bf41f83
Compare
fc05354 to
1d97818
Compare
1d97818 to
bae239e
Compare
bae239e to
26427ca
Compare
jgriffiths
left a comment
There was a problem hiding this comment.
Perhaps you want to merge the first cleanup commit, and we can look at the greedy change in isolation after review?
src/ga_tx.cpp
Outdated
| if (addressee_asset_id == asset_id) { | ||
| required_total += add_tx_addressee(session, net_params, result, tx, addressee); | ||
| reordered_addressees.push_back(addressee); | ||
| if (addressee.value("greedy", false)) { |
There was a problem hiding this comment.
booleans in json should be named is_xxx, has_xxx etc.
There is no check here for multiple greedy outputs, should that error?
There was a problem hiding this comment.
Changed to is_greedy
26427ca to
3881e9e
Compare
Setting the 'greedy' flag on an addressee means it will consume any change instead of it going to a change output.
3881e9e to
d74f723
Compare
Setting the 'greedy' flag on an addressee means it will consume any change instead of it going to a change output.