Skip to content

Commit

Permalink
Merge #3816
Browse files Browse the repository at this point in the history
3816: Disable unneeded assertion r=bolt12 a=bolt12

# Description

This PR fixes #3778 and #3748. It just disables an unneeded assertion that checks if the peer that is getting promoted is a member of the `KnownPeer` set. The reason this assertion is unneeded is because it is possible to reach that point of the code and the peer is not a member of the set due to race conditions. That's why there's an `if` guard to cover for that case.



Co-authored-by: Armando Santos <[email protected]>
  • Loading branch information
iohk-bors[bot] and bolt12 authored Jun 27, 2022
2 parents 9d07323 + e731021 commit a95be8e
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ jobPromoteWarmPeer PeerSelectionActions{peerStateActions = PeerStateActions {act
}
_now ->

assert (peeraddr `KnownPeers.member` knownPeers st) $
if peeraddr `EstablishedPeers.member` establishedPeers st
then
let activePeers' = Set.insert peeraddr activePeers in
Expand All @@ -316,7 +315,6 @@ jobPromoteWarmPeer PeerSelectionActions{peerStateActions = PeerStateActions {act
decisionJobs = []
}


----------------------------
-- Active peers above target
--
Expand Down

0 comments on commit a95be8e

Please sign in to comment.