Merge 3c5fb9691b into merged_master (Bitcoin PR bitcoin/bitcoin#26007)

This commit is contained in:
Byron Hambly 2024-11-26 13:09:22 +02:00
commit 6b70e5124c

View file

@ -79,8 +79,7 @@ def to_jsonable(obj: Any) -> Any:
val = getattr(obj, slot, None)
if slot in HASH_INTS and isinstance(val, int):
ret[slot] = ser_uint256(val).hex()
elif slot in HASH_INT_VECTORS:
assert all(isinstance(a, int) for a in val)
elif slot in HASH_INT_VECTORS and all(isinstance(a, int) for a in val):
ret[slot] = [ser_uint256(a).hex() for a in val]
else:
ret[slot] = to_jsonable(val)