1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-18 05:28:40 +00:00

feat(common/tools): allow overriding non-token network duplicity info

This commit is contained in:
matejcik 2020-11-10 16:05:40 +01:00 committed by Tomas Susanka
parent e8fcdbb426
commit f709df02d6

View File

@ -331,7 +331,11 @@ def check_dups(buckets, print_at_level=logging.WARNING):
continue
supported = [coin for coin in bucket if not coin["unsupported"]]
nontokens = [coin for coin in bucket if not coin_info.is_token(coin)]
nontokens = [
coin
for coin in bucket
if coin.get("duplicate") and not coin_info.is_token(coin)
] # we do not count override-marked coins as duplicates here
cleared = not any(coin.get("duplicate") for coin in bucket)
# string generation
@ -347,7 +351,7 @@ def check_dups(buckets, print_at_level=logging.WARNING):
# some previous step has explicitly marked them as non-duplicate
level = logging.INFO
else:
# at most 1 non-token - we tenatively allow token collisions
# at most 1 non-token - we tentatively allow token collisions
# when explicitly marked as supported
level = logging.WARNING
else: