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:
11
Dockerfile
11
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 && \
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user