Fix txb.__overMaximumFees for segwit

This commit is contained in:
junderw 2017-08-31 13:00:22 +09:00 committed by Daniel Cousens
parent 9503e64bde
commit 6e5742d86d

View file

@ -648,7 +648,7 @@ TransactionBuilder.prototype.__build = function (allowIncomplete) {
if (!allowIncomplete) {
// do not rely on this, its merely a last resort
if (this.__overMaximumFees(tx.byteLength())) {
if (this.__overMaximumFees(tx.virtualSize())) {
throw new Error('Transaction has absurd fees')
}
}