reduce safety margin to 2%
This commit is contained in:
parent
8865d42ec3
commit
8ce304fd4e
|
@ -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();
|
||||||
|
|
|
@ -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…
Reference in New Issue