Browse Source

reduce safety margin to 2%

activeAddress
Ivan Socolsky 9 years ago
parent
commit
8ce304fd4e
  1. 2
      lib/model/txproposal.js
  2. 2
      test/models/txproposal.js

2
lib/model/txproposal.js

@ -239,7 +239,7 @@ TxProposal.prototype.getEstimatedSizeForSingleInput = function() {
TxProposal.prototype.getEstimatedSize = function() { TxProposal.prototype.getEstimatedSize = function() {
// Note: found empirically based on all multisig P2SH inputs and within m & n allowed limits. // 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 overhead = 4 + 4 + 9 + 9;
var inputSize = this.getEstimatedSizeForSingleInput(); var inputSize = this.getEstimatedSizeForSingleInput();

2
test/models/txproposal.js

@ -56,7 +56,7 @@ describe('TxProposal', function() {
describe('#getEstimatedSize', function() { describe('#getEstimatedSize', function() {
it('should return estimated size in bytes', function() { it('should return estimated size in bytes', function() {
var x = TxProposal.fromObj(aTXP()); var x = TxProposal.fromObj(aTXP());
x.getEstimatedSize().should.equal(407); x.getEstimatedSize().should.equal(396);
}); });
}); });

Loading…
Cancel
Save