diff --git a/backend/mempool-config.sample.json b/backend/mempool-config.sample.json index f51aa3cb9..9b55905f4 100644 --- a/backend/mempool-config.sample.json +++ b/backend/mempool-config.sample.json @@ -7,8 +7,11 @@ "API_URL_PREFIX": "/api/v1/", "POLL_RATE_MS": 2000 }, - "ESPLORA": { - "REST_API_URL": "http://127.0.0.1:3000" + "CORE_RPC": { + "HOST": "127.0.0.1", + "PORT": 8332, + "USERNAME": "mempool", + "PASSWORD": "mempool" }, "ELECTRUM": { "HOST": "127.0.0.1", @@ -16,11 +19,8 @@ "TLS_ENABLED": true, "TX_LOOKUPS": false }, - "BITCOIND": { - "HOST": "127.0.0.1", - "PORT": 3306, - "USERNAME": "mempool", - "PASSWORD": "mempool" + "ESPLORA": { + "REST_API_URL": "http://127.0.0.1:3000" }, "DATABASE": { "ENABLED": true, diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts index 7fc8075ff..c40ab031c 100644 --- a/backend/src/api/bitcoin/bitcoin-api.ts +++ b/backend/src/api/bitcoin/bitcoin-api.ts @@ -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, }); } diff --git a/backend/src/api/bitcoin/bitcoin-base.api.ts b/backend/src/api/bitcoin/bitcoin-base.api.ts index a79a1a311..71e7c9093 100644 --- a/backend/src/api/bitcoin/bitcoin-base.api.ts +++ b/backend/src/api/bitcoin/bitcoin-base.api.ts @@ -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, }); } diff --git a/backend/src/config.ts b/backend/src/config.ts index 1886ae880..2b7367507 100644 --- a/backend/src/config.ts +++ b/backend/src/config.ts @@ -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;