This commit is contained in:
Christopher Jeffrey 2016-07-05 12:14:26 -07:00
parent 6f345df018
commit bbe8943bf4
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
4 changed files with 6 additions and 5 deletions

View File

@ -133,7 +133,6 @@ function Environment() {
this.errors = require('./errors');
this.ldb = require('./ldb');
this.timedata = require('./timedata');
this.sigcache = require('./sigcache')(0);
this.script = require('./script');
this.opcode = this.script.Opcode;
this.stack = this.script.Stack;
@ -177,10 +176,12 @@ function Environment() {
this.http = require('./http');
this.workers = require('./workers');
this.sigcache = require('./sigcache')(0);
this.time = new this.timedata();
this.defaultLogger = new this.logger('none');
this.useWorkers = false;
this.workerPool = new this.workers();
this.master = null;
this.set({
network: process.env.BCOIN_NETWORK || 'main',

View File

@ -58,6 +58,7 @@ function TXDB(db, options) {
this.walletdb = db;
this.db = db.db;
this.logger = db.logger;
this.network = db.network;
this.options = options;
this.network = bcoin.network.get(options.network);
this.busy = false;

View File

@ -2506,13 +2506,13 @@ utils.binarySearch = function binarySearch(items, key, compare, insert) {
* @param {Array} items
* @param {Object} item
* @param {Function} compare
* @returns {Number} Length.
* @returns {Number} index
*/
utils.binaryInsert = function binaryInsert(items, item, compare) {
var i = utils.binarySearch(items, item, compare, true);
items.splice(i, 0, item);
return items.length;
return i;
};
/**
@ -2520,7 +2520,7 @@ utils.binaryInsert = function binaryInsert(items, item, compare) {
* @param {Array} items
* @param {Object} item
* @param {Function} compare
* @returns {Number} Length.
* @returns {Boolean}
*/
utils.binaryRemove = function binaryRemove(items, item, compare) {

View File

@ -63,7 +63,6 @@ function WalletDB(options) {
});
this.tx = new bcoin.txdb(this, {
network: this.network,
verify: this.options.verify,
useFilter: true
});