take out modifying behavior to estimateFee

This commit is contained in:
Patrick Nagurny 2015-08-18 11:58:12 -04:00
parent 43ec2d3b34
commit d6d9c6a975
2 changed files with 0 additions and 21 deletions

View File

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

View File

@ -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 = {