Use coins_plm.py as single source of truth for ElectrumX patch

- Remove inline Palladium coin definition from Dockerfile.electrumx
  and COPY coins_plm.py instead, reducing duplication
- Add TX_COUNT/TX_COUNT_HEIGHT/TX_PER_BLOCK to coins_plm.py with
  real chain data (457478 txs at height 382404)
- Update entrypoint.sh to fetch live TX stats from palladiumd at
  container startup, keeping sync estimates accurate automatically
This commit is contained in:
2026-02-13 00:50:41 +01:00
parent 8131d7048e
commit 5cc3dcacc8
3 changed files with 66 additions and 79 deletions

View File

@@ -21,6 +21,11 @@ class Palladium(Bitcoin):
# Since we share Genesis with Bitcoin, we must clear inherited checkpoints
CHECKPOINTS = []
# === Network statistics (required by ElectrumX) ===
TX_COUNT = 457478
TX_COUNT_HEIGHT = 382404
TX_PER_BLOCK = 2
# === Default ports ===
RPC_PORT = 2332
PEER_DEFAULT_PORTS = {'t': '2333', 's': '52333'}
@@ -45,6 +50,11 @@ class PalladiumTestnet(Palladium):
# === Genesis hash (Bitcoin testnet) ===
GENESIS_HASH = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
# === Network statistics (required by ElectrumX) ===
TX_COUNT = 500
TX_COUNT_HEIGHT = 1
TX_PER_BLOCK = 2
# === Testnet ports ===
RPC_PORT = 12332
PEER_DEFAULT_PORTS = {'t': '12333', 's': '62333'}