18 lines
738 B
Python
18 lines
738 B
Python
"""Frozen bodies produced by Trinity PartyUpdate::Write at d02645dd.
|
|
|
|
These four 70334 candidate cases select the 70291+ format with the two
|
|
values (1, 0) documented in the adjacent 70338 capture.
|
|
"""
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from native_codec_driver import codec_library_path, require_optional_file, load, serialize
|
|
|
|
require_optional_file(codec_library_path())
|
|
codec = load()
|
|
for row in json.loads(Path(__file__).with_name('party_update_70291.json').read_text()):
|
|
actual = serialize(codec, row['mode'], bytes.fromhex(row['input']))
|
|
if actual != bytes.fromhex(row['expected']):
|
|
raise AssertionError(f"{row['case']}: PartyUpdate body differs from original writer")
|
|
print(row['case'], len(actual), 'bytes')
|