minor.
This commit is contained in:
parent
6f345df018
commit
bbe8943bf4
@ -133,7 +133,6 @@ function Environment() {
|
|||||||
this.errors = require('./errors');
|
this.errors = require('./errors');
|
||||||
this.ldb = require('./ldb');
|
this.ldb = require('./ldb');
|
||||||
this.timedata = require('./timedata');
|
this.timedata = require('./timedata');
|
||||||
this.sigcache = require('./sigcache')(0);
|
|
||||||
this.script = require('./script');
|
this.script = require('./script');
|
||||||
this.opcode = this.script.Opcode;
|
this.opcode = this.script.Opcode;
|
||||||
this.stack = this.script.Stack;
|
this.stack = this.script.Stack;
|
||||||
@ -177,10 +176,12 @@ function Environment() {
|
|||||||
this.http = require('./http');
|
this.http = require('./http');
|
||||||
this.workers = require('./workers');
|
this.workers = require('./workers');
|
||||||
|
|
||||||
|
this.sigcache = require('./sigcache')(0);
|
||||||
this.time = new this.timedata();
|
this.time = new this.timedata();
|
||||||
this.defaultLogger = new this.logger('none');
|
this.defaultLogger = new this.logger('none');
|
||||||
this.useWorkers = false;
|
this.useWorkers = false;
|
||||||
this.workerPool = new this.workers();
|
this.workerPool = new this.workers();
|
||||||
|
this.master = null;
|
||||||
|
|
||||||
this.set({
|
this.set({
|
||||||
network: process.env.BCOIN_NETWORK || 'main',
|
network: process.env.BCOIN_NETWORK || 'main',
|
||||||
|
|||||||
@ -58,6 +58,7 @@ function TXDB(db, options) {
|
|||||||
this.walletdb = db;
|
this.walletdb = db;
|
||||||
this.db = db.db;
|
this.db = db.db;
|
||||||
this.logger = db.logger;
|
this.logger = db.logger;
|
||||||
|
this.network = db.network;
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.network = bcoin.network.get(options.network);
|
this.network = bcoin.network.get(options.network);
|
||||||
this.busy = false;
|
this.busy = false;
|
||||||
|
|||||||
@ -2506,13 +2506,13 @@ utils.binarySearch = function binarySearch(items, key, compare, insert) {
|
|||||||
* @param {Array} items
|
* @param {Array} items
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
* @param {Function} compare
|
* @param {Function} compare
|
||||||
* @returns {Number} Length.
|
* @returns {Number} index
|
||||||
*/
|
*/
|
||||||
|
|
||||||
utils.binaryInsert = function binaryInsert(items, item, compare) {
|
utils.binaryInsert = function binaryInsert(items, item, compare) {
|
||||||
var i = utils.binarySearch(items, item, compare, true);
|
var i = utils.binarySearch(items, item, compare, true);
|
||||||
items.splice(i, 0, item);
|
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 {Array} items
|
||||||
* @param {Object} item
|
* @param {Object} item
|
||||||
* @param {Function} compare
|
* @param {Function} compare
|
||||||
* @returns {Number} Length.
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
utils.binaryRemove = function binaryRemove(items, item, compare) {
|
utils.binaryRemove = function binaryRemove(items, item, compare) {
|
||||||
|
|||||||
@ -63,7 +63,6 @@ function WalletDB(options) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.tx = new bcoin.txdb(this, {
|
this.tx = new bcoin.txdb(this, {
|
||||||
network: this.network,
|
|
||||||
verify: this.options.verify,
|
verify: this.options.verify,
|
||||||
useFilter: true
|
useFilter: true
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user