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:
1 parent
3d05c37feb
commit
f1e6ad29ab
6 files changed
+13
-63
No files matched your search
@@ -1,17 +1,16 @@
|
||||
import pytest
|
||||
|
||||
from electrumx.lib.script import OpCodes, is_unspendable_legacy, is_unspendable_genesis
|
||||
from electrumx.lib.script import OpCodes, is_unspendable_legacy
|
||||
|
||||
|
||||
@pytest.mark.parametrize("script, iug", (
|
||||
(bytes([OpCodes.OP_RETURN]), False),
|
||||
(bytes([OpCodes.OP_RETURN]) + bytes([2, 28, 50]), False),
|
||||
(bytes([OpCodes.OP_0, OpCodes.OP_RETURN]), True),
|
||||
(bytes([OpCodes.OP_0, OpCodes.OP_RETURN]) + bytes([2, 28, 50]), True)
|
||||
@pytest.mark.parametrize("script", (
|
||||
bytes([OpCodes.OP_RETURN]),
|
||||
bytes([OpCodes.OP_RETURN]) + bytes([2, 28, 50]),
|
||||
bytes([OpCodes.OP_0, OpCodes.OP_RETURN]),
|
||||
bytes([OpCodes.OP_0, OpCodes.OP_RETURN]) + bytes([2, 28, 50]),
|
||||
))
|
||||
def test_op_return_legacy(script, iug):
|
||||
def test_op_return(script):
|
||||
assert is_unspendable_legacy(script)
|
||||
assert is_unspendable_genesis(script) is iug
|
||||
|
||||
|
||||
@pytest.mark.parametrize("script", (
|
||||
@@ -23,4 +22,3 @@ def test_op_return_legacy(script, iug):
|
||||
))
|
||||
def test_not_op_return(script):
|
||||
assert not is_unspendable_legacy(script)
|
||||
assert not is_unspendable_genesis(script)
|
||||
Reference in new issue
Block a user