mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-22 12:00:40 +08:00
roa.py: fix
This commit is contained in:
parent
b34b031ce6
commit
9793b64b1a
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,11 @@ def route_to_roa(asn_table: dict):
|
|||
if not net1["prefix"].overlaps(net2["prefix"]):
|
||||
continue
|
||||
entity_from_net = lambda net: asn_table.get(net["asn"])["owner"]
|
||||
assert net1["prefix"] != net2["prefix"] or (net1['asn'] != net2['asn'] and entity_from_net(net1) == entity_from_net(net2))
|
||||
try:
|
||||
assert net1["prefix"] != net2["prefix"]
|
||||
except AssertionError:
|
||||
assert net1['asn'] != net2['asn'] and entity_from_net(net1) == entity_from_net(net2)
|
||||
continue
|
||||
assert net1["prefix"].supernet_of(net2["prefix"])
|
||||
s1net, s2net = (net1["supernet"], net2["supernet"])
|
||||
assert s2net # please include supernet = <cidr> in your route
|
||||
|
|
Loading…
Reference in a new issue