TransactionBuilder: move ABSURD_FEERATE to static constant
This commit is contained in:
parent
f0db59fa8e
commit
61be897429
1 changed files with 3 additions and 1 deletions
|
@ -236,6 +236,8 @@ function TransactionBuilder (network) {
|
||||||
this.tx = new Transaction()
|
this.tx = new Transaction()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TransactionBuilder.ABSURD_FEERATE = 1000
|
||||||
|
|
||||||
TransactionBuilder.prototype.setLockTime = function (locktime) {
|
TransactionBuilder.prototype.setLockTime = function (locktime) {
|
||||||
typeforce(types.UInt32, locktime)
|
typeforce(types.UInt32, locktime)
|
||||||
|
|
||||||
|
@ -513,7 +515,7 @@ TransactionBuilder.prototype.__hasAbsurdFeeRate = function (bytes) {
|
||||||
var fee = incoming - outgoing
|
var fee = incoming - outgoing
|
||||||
var feeRate = fee / bytes
|
var feeRate = fee / bytes
|
||||||
|
|
||||||
return feeRate > 1000
|
return feeRate > TransactionBuilder.ABSURD_FEERATE
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = TransactionBuilder
|
module.exports = TransactionBuilder
|
||||||
|
|
Loading…
Reference in a new issue