From d6d9c6a9753b196ca4be522994d851a8964e5a28 Mon Sep 17 00:00:00 2001 From: Patrick Nagurny Date: Tue, 18 Aug 2015 11:58:12 -0400 Subject: [PATCH] take out modifying behavior to estimateFee --- lib/db.js | 6 ------ test/db.unit.js | 15 --------------- 2 files changed, 21 deletions(-) diff --git a/lib/db.js b/lib/db.js index efae1f4f..c41acf9e 100644 --- a/lib/db.js +++ b/lib/db.js @@ -123,12 +123,6 @@ DB.prototype.sendTransaction = function(tx, callback) { DB.prototype.estimateFee = function(blocks, callback) { var self = this; - // For some reason getting fee for 1 block returns -1 - // Until this is resolved, just make it 2 blocks - if(blocks === 1) { - blocks = 2; - } - setImmediate(function() { callback(null, self.bitcoind.estimateFee(blocks)); }); diff --git a/test/db.unit.js b/test/db.unit.js index 82e00076..e4081a8e 100644 --- a/test/db.unit.js +++ b/test/db.unit.js @@ -196,21 +196,6 @@ describe('Bitcoin DB', function() { }); describe("#estimateFee", function() { - // To accommodate weird bitcoind behavior where 1 block always results in -1 - it('should set blocks to 2 if 1 was passed in', function(done) { - var db = new DB({store: memdown}); - db.bitcoind = { - estimateFee: sinon.stub().returns(1000) - }; - - db.estimateFee(1, function(err, fee) { - should.not.exist(err); - fee.should.equal(1000); - db.bitcoind.estimateFee.args[0][0].should.equal(2); - done(); - }); - }); - it('should pass along the fee from bitcoind', function(done) { var db = new DB({store: memdown}); db.bitcoind = {