diff --git a/lib/model/txproposal.js b/lib/model/txproposal.js index 2697c4c..6f5d782 100644 --- a/lib/model/txproposal.js +++ b/lib/model/txproposal.js @@ -239,7 +239,7 @@ TxProposal.prototype.getEstimatedSizeForSingleInput = function() { TxProposal.prototype.getEstimatedSize = function() { // Note: found empirically based on all multisig P2SH inputs and within m & n allowed limits. - var safetyMargin = 0.05; + var safetyMargin = 0.02; var overhead = 4 + 4 + 9 + 9; var inputSize = this.getEstimatedSizeForSingleInput(); diff --git a/test/models/txproposal.js b/test/models/txproposal.js index 28d0cb7..6a8e35a 100644 --- a/test/models/txproposal.js +++ b/test/models/txproposal.js @@ -56,7 +56,7 @@ describe('TxProposal', function() { describe('#getEstimatedSize', function() { it('should return estimated size in bytes', function() { var x = TxProposal.fromObj(aTXP()); - x.getEstimatedSize().should.equal(407); + x.getEstimatedSize().should.equal(396); }); });