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
This commit is contained in:
2025-11-28 12:49:04 +01:00
parent 54b434d33f
commit 61ffb0729c
2 changed files with 9 additions and 4 deletions

View File

@@ -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 && \

View File

@@ -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