Config updates. Renamed BITCOIND to CORE_RPC.

This commit is contained in:
softsimon
2021-01-11 14:53:18 +07:00
parent 27d2f5bd5a
commit e76ee93bbb
4 changed files with 19 additions and 19 deletions

View File

@@ -15,10 +15,10 @@ class BitcoinApi implements AbstractBitcoinApi {
constructor() {
this.bitcoindClient = new bitcoin.Client({
host: config.BITCOIND.HOST,
port: config.BITCOIND.PORT,
user: config.BITCOIND.USERNAME,
pass: config.BITCOIND.PASSWORD,
host: config.CORE_RPC.HOST,
port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: 60000,
});
}

View File

@@ -7,10 +7,10 @@ class BitcoinBaseApi {
constructor() {
this.bitcoindClient = new bitcoin.Client({
host: config.BITCOIND.HOST,
port: config.BITCOIND.PORT,
user: config.BITCOIND.USERNAME,
pass: config.BITCOIND.PASSWORD,
host: config.CORE_RPC.HOST,
port: config.CORE_RPC.PORT,
user: config.CORE_RPC.USERNAME,
pass: config.CORE_RPC.PASSWORD,
timeout: 60000,
});
}

View File

@@ -18,7 +18,7 @@ interface IConfig {
TLS_ENABLED: boolean;
TX_LOOKUPS: boolean;
};
BITCOIND: {
CORE_RPC: {
HOST: string;
PORT: number;
USERNAME: string;
@@ -71,7 +71,7 @@ const defaults: IConfig = {
'TLS_ENABLED': true,
'TX_LOOKUPS': false
},
'BITCOIND': {
'CORE_RPC': {
'HOST': '127.0.0.1',
'PORT': 8332,
'USERNAME': 'mempool',
@@ -110,7 +110,7 @@ class Config implements IConfig {
MEMPOOL: IConfig['MEMPOOL'];
ESPLORA: IConfig['ESPLORA'];
ELECTRUM: IConfig['ELECTRUM'];
BITCOIND: IConfig['BITCOIND'];
CORE_RPC: IConfig['CORE_RPC'];
DATABASE: IConfig['DATABASE'];
STATISTICS: IConfig['STATISTICS'];
BISQ_BLOCKS: IConfig['BISQ_BLOCKS'];
@@ -122,7 +122,7 @@ class Config implements IConfig {
this.MEMPOOL = configs.MEMPOOL;
this.ESPLORA = configs.ESPLORA;
this.ELECTRUM = configs.ELECTRUM;
this.BITCOIND = configs.BITCOIND;
this.CORE_RPC = configs.CORE_RPC;
this.DATABASE = configs.DATABASE;
this.STATISTICS = configs.STATISTICS;
this.BISQ_BLOCKS = configs.BISQ_BLOCKS;