Add testnet support for palladium electrumx server

Add PalladiumTestnet class with testnet-specific configurations including ports, address prefixes, and genesis hash. Update docker-compose.yml with clear network configuration comments and documentation in README.md explaining how to switch between mainnet and testnet.
This commit is contained in:
2025-11-28 12:32:12 +01:00
parent 4231aafb1e
commit 54b434d33f
3 changed files with 180 additions and 4 deletions

View File

@@ -17,6 +17,31 @@ class Palladium(Bitcoin):
# === Genesis hash (Bitcoin mainnet) ===
GENESIS_HASH = "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
# === Default ports ===
RPC_PORT = 2332
PEER_DEFAULT_PORTS = {'t': '2333', 's': '52333'}
# === Deserializer ===
DESERIALIZER = lib_tx.DeserializerSegWit
class PalladiumTestnet(Palladium):
NAME = "Palladium"
SHORTNAME = "tPLM"
NET = "testnet"
# === Testnet address prefixes ===
P2PKH_VERBYTE = bytes([0x7f]) # 127 decimal - addresses start with 't'
P2SH_VERBYTE = bytes([0x73]) # 115 decimal
WIF_BYTE = bytes([0xff]) # 255 decimal
# === Bech32 prefix for testnet ===
HRP = "tplm"
# === Genesis hash (Bitcoin testnet) ===
GENESIS_HASH = "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
# === Testnet ports ===
RPC_PORT = 12332
PEER_DEFAULT_PORTS = {'t': '12333', 's': '62333'}