Commit d125e080 authored by Éloïs's avatar Éloïs
Browse files

[fix] persistent proxyConf

parent 927da9f8
......@@ -15,6 +15,7 @@ import {DBBlock} from "../db/DBBlock"
import {DBMembership} from "./sqliteDAL/MembershipDAL"
import {MerkleDTO} from "../dto/MerkleDTO"
import {CommonConstants} from "../common-libs/constants"
import { ProxyConf } from '../proxy';
const fs = require('fs')
const path = require('path')
......@@ -842,7 +843,11 @@ export class FileDAL {
let conf = ConfDTO.complete(overrideConf || {});
if (!defaultConf) {
const savedConf = await this.confDAL.loadConf();
const savedProxyConf = _(savedConf.proxyConf).extend({});
conf = _(savedConf).extend(overrideConf || {});
if (overrideConf.proxyConf !== undefined) {} else {
conf.proxyConf = _(savedProxyConf).extend({});
}
}
if (this.loadConfHook) {
await this.loadConfHook(conf)
......
......@@ -438,7 +438,7 @@ class Stack {
}
}
function commandLineConf(program:any, conf:ConfDTO = ConfDTO.mock()) {
function commandLineConf(program:any, conf:any = {}) {
conf = conf || {};
const cli = {
......
......@@ -73,7 +73,7 @@ export class Server extends stream.Duplex implements HookableServer {
TransactionsService:TransactionService
private documentFIFO:GlobalFifoPromise
constructor(home:string, memoryOnly:boolean, private overrideConf:ConfDTO) {
constructor(home:string, memoryOnly:boolean, private overrideConf:any) {
super({ objectMode: true })
this.home = home;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment