Skip to content

Commit 76137da

Browse files
authored
Check the network to enable mainnet (#41)
* Check the network to enable mainnet * default to signet on the docker file
1 parent 5e4546b commit 76137da

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

backend/src/api/blocks.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,9 @@ class Blocks {
987987

988988
const angorDecoder = new AngorTransactionDecoder(
989989
transactionHex,
990-
AngorSupportedNetworks.Testnet
990+
config.MEMPOOL.NETWORK === 'mainnet'
991+
? AngorSupportedNetworks.Bitcoin
992+
: AngorSupportedNetworks.Testnet
991993
);
992994

993995
await angorDecoder

backend/src/api/mempool.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@ class Mempool {
391391

392392
const angorDecoder = new AngorTransactionDecoder(
393393
transactionHex,
394-
AngorSupportedNetworks.Testnet
394+
config.MEMPOOL.NETWORK === 'mainnet'
395+
? AngorSupportedNetworks.Bitcoin
396+
: AngorSupportedNetworks.Testnet
395397
);
396398

397399
await angorDecoder

backend/src/indexer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ class Indexer {
256256

257257
const angorDecoder = new AngorTransactionDecoder(
258258
transactionHex,
259-
AngorSupportedNetworks.Testnet
259+
config.MEMPOOL.NETWORK === 'mainnet'
260+
? AngorSupportedNetworks.Bitcoin
261+
: AngorSupportedNetworks.Testnet
260262
);
261263

262264
// Try to decode and store transaction as Angor project creation transaction.

docker-angor-api/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ services:
5252
container_name: mempool-api
5353
image: blockcore/mempool-backend:latest
5454
environment:
55+
MEMPOOL_NETWORK: "signet"
5556
MEMPOOL_BACKEND: "esplora" # can be esplora or electrum
5657
ESPLORA_REST_API_URL: "http://mempool-electrs:3003"
5758
ESPLORA_REQUEST_TIMEOUT: "50000"

0 commit comments

Comments
 (0)