fix computation of fee without change output
This commit is contained in:
parent
49e621f4f2
commit
d9d5a26085
@ -845,7 +845,7 @@ Transaction.prototype._clearSignatures = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Transaction._estimateFee = function(size, amountAvailable) {
|
Transaction._estimateFee = function(size, amountAvailable) {
|
||||||
var fee = Math.ceil(size / Transaction.FEE_PER_KB);
|
var fee = Math.ceil(size / 1000) * Transaction.FEE_PER_KB;
|
||||||
if (amountAvailable > fee) {
|
if (amountAvailable > fee) {
|
||||||
size += Transaction.CHANGE_OUTPUT_MAX_SIZE;
|
size += Transaction.CHANGE_OUTPUT_MAX_SIZE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user