reduce safety margin to 2%

This commit is contained in:
Ivan Socolsky 2016-03-10 12:34:52 -03:00
parent 8865d42ec3
commit 8ce304fd4e
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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);
}); });
}); });