Skip to content
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

Fix the formula used to calculate BSQ amount needed to avoid dust #5475

Merged
merged 1 commit into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ private Transaction getPreparedTxWithMandatoryBsqChangeOutput(Coin fee) throws I
log.warn("We increased required input as change output was zero or dust: New change value={}", change);
String info = "Available BSQ balance=" + coinSelection.valueGathered.value / 100 + " BSQ. " +
"Intended fee to burn=" + fee.value / 100 + " BSQ. " +
"Please increase your balance to at least " + (coinSelection.valueGathered.value + minDustThreshold.value) / 100 + " BSQ.";
"Please increase your balance to at least " + (fee.value + minDustThreshold.value) / 100 + " BSQ.";
checkArgument(coinSelection.valueGathered.compareTo(fee) > 0,
"This transaction require a change output of at least " + minDustThreshold.value / 100 + " BSQ (dust limit). " +
info);
Expand Down