http: fix require.
This commit is contained in:
parent
8c00722dda
commit
f7b61278d0
@ -8,7 +8,7 @@
|
||||
|
||||
var bcoin = require('../env');
|
||||
var utils = require('../utils/utils');
|
||||
var IP = require('../ip');
|
||||
var IP = require('../utils/ip');
|
||||
var assert = utils.assert;
|
||||
var constants = bcoin.constants;
|
||||
var fs;
|
||||
|
||||
@ -11,7 +11,7 @@ var Network = require('../protocol/network');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
|
||||
var utils = require('../utils/utils');
|
||||
var http = require('./');
|
||||
var Client = require('./client');
|
||||
|
||||
/**
|
||||
* HTTPWallet
|
||||
@ -35,7 +35,7 @@ function HTTPWallet(options) {
|
||||
this.options = options;
|
||||
this.network = Network.get(options.network);
|
||||
|
||||
this.client = new http.client(options);
|
||||
this.client = new Client(options);
|
||||
this.uri = options.uri;
|
||||
this.id = null;
|
||||
this.token = null;
|
||||
|
||||
@ -2017,6 +2017,8 @@ function HostList(pool) {
|
||||
|
||||
// Misbehaving hosts
|
||||
this.misbehaving = {};
|
||||
|
||||
this.setSeeds(this.pool.network.seeds);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2222,6 +2224,11 @@ HostList.prototype.isIgnored = function isIgnored(host) {
|
||||
return this.ignored[host] === true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set initial seeds.
|
||||
* @param {String[]} seeds
|
||||
*/
|
||||
|
||||
HostList.prototype.setSeeds = function setSeeds(seeds) {
|
||||
var i, hostname, seed;
|
||||
|
||||
@ -2234,6 +2241,11 @@ HostList.prototype.setSeeds = function setSeeds(seeds) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Add a preferred seed.
|
||||
* @param {String} hostname
|
||||
*/
|
||||
|
||||
HostList.prototype.addSeed = function addSeed(hostname) {
|
||||
var seed = NetworkAddress.fromHostname(hostname, this.pool.network);
|
||||
this.seeds.unshift(seed);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user