-
Notifications
You must be signed in to change notification settings - Fork 17
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
Replace 'Drain' with 'Change' for clearer terminology #54
Conversation
/// Minimum value allowed for a drain (change) output. | ||
pub min_drain_value: u64, | ||
/// Minimum value allowed for a change output. | ||
pub min_change_value: u64, | ||
|
||
/// Strategy to use the excess value other than fee and target | ||
pub excess_strategy: ExcessStrategy, |
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.
#54
Please replace ToDrain
in excess strategy with ToChange
pub enum ExcessStrategy {
ToFee,
ToRecipient,
ToDrain,
}
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.
Done.
@@ -672,7 +672,7 @@ fn calculate_waste( | |||
waste += (accumulated_value - (options.target_value + estimated_fee)); |
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.
#54 Please change this reference to ToDrain
if options.excess_strategy != ExcessStrategy::ToDrain {
// Change is not created if excess strategy is ToFee or ToRecipient. Hence cost of change is added
waste += (accumulated_value - (options.target_value + estimated_fee));
} else {
src/lib.rs
Outdated
min_change_value: 500, | ||
excess_strategy: ExcessStrategy::ToDrain, | ||
} |
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.
/ #54 Please change ToDrain
src/lib.rs
Outdated
cost_per_input: 20, | ||
cost_per_output: 10, | ||
min_drain_value, | ||
min_change_value, | ||
excess_strategy: ExcessStrategy::ToDrain, |
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.
#54 Please change ToDrain
src/lib.rs
Outdated
cost_per_input: 20, | ||
cost_per_output: 10, | ||
min_drain_value: 500, | ||
min_change_value: 500, | ||
excess_strategy: ExcessStrategy::ToDrain, |
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.
#54 Please change ToDrain
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.
Thank you for the feedback!
#52