minor.
This commit is contained in:
parent
6f345df018
commit
bbe8943bf4
@ -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',
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -63,7 +63,6 @@ function WalletDB(options) {
|
||||
});
|
||||
|
||||
this.tx = new bcoin.txdb(this, {
|
||||
network: this.network,
|
||||
verify: this.options.verify,
|
||||
useFilter: true
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user