1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-12-23 20:19:24 +08:00

check if supernet is really super

This commit is contained in:
JerryXiao 2020-07-21 11:44:55 +08:00
parent fa60c76b66
commit baa2c210d9
Signed by: Jerry
GPG key ID: 9D9CE43650FF2BAA

View file

@ -109,7 +109,7 @@ def route_to_roa(asn_table: dict):
)
assert fields["name"]
assert is_neo_network(fields["prefix"])
assert not fields["supernet"] or is_neo_network(fields["supernet"])
assert not fields["supernet"] or (is_neo_network(fields["supernet"]) and fields["supernet"].supernet_of(fields["prefix"]))
yield pick(fields, ["asn", "name", "type", "prefix", "supernet"])
entities = sorted(make_route(), key=lambda item: item["asn"])