Allow unrecognized receivers.
This commit is contained in:
parent
503a57bcbb
commit
854a2ddd87
|
@ -49,16 +49,10 @@ def decode_unified(addr_str):
|
||||||
assert [1, 2, 3].count(b) > 0, "receiver type " + str(b) + " not recognized"
|
assert [1, 2, 3].count(b) > 0, "receiver type " + str(b) + " not recognized"
|
||||||
s = 1
|
s = 1
|
||||||
elif s == 1:
|
elif s == 1:
|
||||||
receiver_len = b
|
receiver_len = b
|
||||||
if receiver_type == 1:
|
expected_len == {1: 20, 2: 43, 3: 43}.get(receiver_type)
|
||||||
assert receiver_len == 20
|
if expected_len is not None:
|
||||||
elif receiver_type == 2:
|
assert receiver_len == expected_len, "incorrect receiver length"
|
||||||
assert receiver_len == 43
|
|
||||||
elif receiver_type == 3:
|
|
||||||
assert receiver_len == 43
|
|
||||||
else:
|
|
||||||
assert False, "incorrect receiver length"
|
|
||||||
s = 2
|
|
||||||
elif s == 2:
|
elif s == 2:
|
||||||
if len(acc) < receiver_len:
|
if len(acc) < receiver_len:
|
||||||
acc.append(b)
|
acc.append(b)
|
||||||
|
|
Loading…
Reference in New Issue