From 61ffb0729cdbac954642d4894e2f2a0e56d5cc05 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Fri, 28 Nov 2025 12:49:04 +0100 Subject: [PATCH] Update coin configuration and imports - Remove redundant NET setting as it's automatically determined by COIN - Update Dockerfile to handle both Palladium and PalladiumTestnet imports - Register both coin types in COIN_CLASSES --- Dockerfile | 11 ++++++++--- docker-compose.yml | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4882fc7..11220b0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,14 +7,19 @@ import re, pathlib p = pathlib.Path('/electrumx/src/electrumx/lib/coins.py') s = p.read_text(encoding='utf-8') -if 'from electrumx.lib.coins_plm import Palladium' not in s: - s += '\nfrom electrumx.lib.coins_plm import Palladium\n' +# Import both Palladium and PalladiumTestnet +if 'from electrumx.lib.coins_plm import Palladium, PalladiumTestnet' not in s: + s += '\nfrom electrumx.lib.coins_plm import Palladium, PalladiumTestnet\n' +# Register both coins in COIN_CLASSES if '"Palladium": Palladium' not in s: s = re.sub(r'(COIN_CLASSES\s*=\s*\{)', r'\1\n "Palladium": Palladium,', s) +if '"PalladiumTestnet": PalladiumTestnet' not in s: + s = re.sub(r'(COIN_CLASSES\s*=\s*\{)', r'\1\n "PalladiumTestnet": PalladiumTestnet,', s) + p.write_text(s, encoding='utf-8') -print('>> Patched ElectrumX with Palladium coin') +print('>> Patched ElectrumX with Palladium and PalladiumTestnet coins') PY RUN mkdir -p /certs && \ diff --git a/docker-compose.yml b/docker-compose.yml index ecfcdb6..6ce5c72 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,9 +13,9 @@ services: # ===== Network Configuration ===== # For MAINNET use: COIN: "Palladium" and DAEMON_URL port 2332 # For TESTNET use: COIN: "PalladiumTestnet" and DAEMON_URL port 12332 + # NOTE: Do not set NET manually - it is automatically set by the COIN class COIN: "Palladium" # Change to "PalladiumTestnet" for testnet - NET: "mainnet" # This is set automatically by the COIN parameter # Palladium Core RPC connection # MAINNET: port 2332 | TESTNET: port 12332