Blacklist and whitelist intersection handling

This commit is contained in:
Vladimir Krutkin 2023-03-20 14:32:07 +03:00
parent d094e046a5
commit dfdb35ad8e
2 changed files with 7 additions and 8 deletions

View File

@ -393,3 +393,9 @@ fixme-del "FbcbtA4eCx"
(fixme-set "workflow" "test" "5RbVNm9SRz")
(fixme-set "assigned" "fastopk" "EpnYqZi7bW")
(fixme-set "workflow" "test" "EpnYqZi7bW")
<<<<<<< HEAD
=======
(fixme-set "assigned" "fastpok" "Da2nChoaL9")
fixme-del "Da2nChoaL9"
>>>>>>> 8fbb11a (Blacklist and whitelist intersection handling)

View File

@ -440,14 +440,7 @@ runPeer opts = Exception.handle myException $ do
$ catMaybes [ fromStringMay x | x <- Set.toList xs
] :: Set (PubKey 'Sign UDP)
let blkeys = toKeys bls
let wlkeys = toKeys whs
-- REVIEW: no-time-to-die
просто удаляй пира из вайтлиста,
если он в блэклисте
unless (Set.disjoint blkeys wlkeys) do
die "whitelist and blacklist intersect"
let wlkeys = toKeys (whs `Set.difference` bls)
let accptAnn = cfgValue @PeerAcceptAnnounceKey conf :: AcceptAnnounce