drop usage of historyKeeper.setConfig

This commit is contained in:
ansuz
2020-01-27 18:54:16 -05:00
parent 80c012f34d
commit b922860339
3 changed files with 49 additions and 36 deletions

View File

@@ -4,7 +4,6 @@ const WebSocketServer = require('ws').Server;
const NetfluxSrv = require('chainpad-server/NetfluxWebsocketSrv');
module.exports.create = function (config) {
var historyKeeper;
var rpc;
const log = config.log;
const wsConfig = {
@@ -50,11 +49,9 @@ module.exports.create = function (config) {
log: log,
};
// XXX historyKeeper exports a `setConfig` method
historyKeeper = HK.create(hkConfig);
}).nThen(function () {
var wsSrv = new WebSocketServer(wsConfig);
// XXX NetfluxSrv shares some internal functions with historyKeeper
// by passing them to setConfig
var historyKeeper = HK.create(hkConfig);
NetfluxSrv.run(wsSrv, config, historyKeeper);
});
};