Skip to content

Commit

Permalink
Merge pull request #5475 from BtcContributor/bsq_dust
Browse files Browse the repository at this point in the history
Fix the formula used to calculate BSQ amount needed to avoid dust
  • Loading branch information
sqrrm authored May 7, 2021
2 parents eb9bce3 + ff18e8a commit 993f9b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,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

0 comments on commit 993f9b4

Please sign in to comment.