Remove dead code left by the other coins

GENESIS_ACTIVATION and is_unspendable_genesis (always legacy for Palladium),
script matching helpers and ScriptPubKey.TO_*_OPS, Deserializer._read_be_uint16,
the unused Coin.CHUNK_SIZE and ENCODE_CHECK, the name-index fallback of the
local RPC 'query' command, and stale comments about other coins.

Block processing and the db format are unchanged: a fresh sync gives the same
history as before. STATIC_BLOCK_HEADERS and the dynamic header code in db.py
are left, being generic functionality that would need wider changes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-22 16:25:58 +02:00
1 parent 3d05c37feb
commit f1e6ad29ab
6 files changed
+13 -63

No files matched your search

+2 -10
View File
@@ -584,7 +584,7 @@ class SessionManager:
async def rpc_add_peer(self, real_name: str) -> str:
'''Add a peer.
real_name: "bch.electrumx.cash t50001 s50002" for example
real_name: "electrum.example.com t50001 s50002" for example
'''
await self.peer_mgr.add_localRPC_peer(real_name)
return f"peer '{real_name}' added"
@@ -697,7 +697,7 @@ class SessionManager:
return self.peer_mgr.rpc_data()
async def rpc_query(self, items, limit):
'''Returns data about a script, address or name.'''
'''Returns data about a script or address.'''
coin = self.env.coin
db = self.db
lines = []
@@ -717,14 +717,6 @@ class SessionManager:
except Base58Error:
pass
try:
script = coin.build_name_index_script(arg.encode("ascii"))
hashX = coin.name_hashX_from_script(script)
lines.append(f'Name: {arg}')
return hashX
except (AttributeError, UnicodeEncodeError):
pass
return None
for arg in items: