mirror of https://github.com/voidlizard/hbs2
Blacklist and whitelist intersection handling
This commit is contained in:
parent
d094e046a5
commit
dfdb35ad8e
|
@ -393,3 +393,9 @@ fixme-del "FbcbtA4eCx"
|
||||||
(fixme-set "workflow" "test" "5RbVNm9SRz")
|
(fixme-set "workflow" "test" "5RbVNm9SRz")
|
||||||
(fixme-set "assigned" "fastopk" "EpnYqZi7bW")
|
(fixme-set "assigned" "fastopk" "EpnYqZi7bW")
|
||||||
(fixme-set "workflow" "test" "EpnYqZi7bW")
|
(fixme-set "workflow" "test" "EpnYqZi7bW")
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
(fixme-set "assigned" "fastpok" "Da2nChoaL9")
|
||||||
|
|
||||||
|
fixme-del "Da2nChoaL9"
|
||||||
|
>>>>>>> 8fbb11a (Blacklist and whitelist intersection handling)
|
||||||
|
|
|
@ -440,14 +440,7 @@ runPeer opts = Exception.handle myException $ do
|
||||||
$ catMaybes [ fromStringMay x | x <- Set.toList xs
|
$ catMaybes [ fromStringMay x | x <- Set.toList xs
|
||||||
] :: Set (PubKey 'Sign UDP)
|
] :: Set (PubKey 'Sign UDP)
|
||||||
let blkeys = toKeys bls
|
let blkeys = toKeys bls
|
||||||
let wlkeys = toKeys whs
|
let wlkeys = toKeys (whs `Set.difference` bls)
|
||||||
|
|
||||||
-- REVIEW: no-time-to-die
|
|
||||||
просто удаляй пира из вайтлиста,
|
|
||||||
если он в блэклисте
|
|
||||||
|
|
||||||
unless (Set.disjoint blkeys wlkeys) do
|
|
||||||
die "whitelist and blacklist intersect"
|
|
||||||
|
|
||||||
let accptAnn = cfgValue @PeerAcceptAnnounceKey conf :: AcceptAnnounce
|
let accptAnn = cfgValue @PeerAcceptAnnounceKey conf :: AcceptAnnounce
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue