File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
src/ouroboros-consensus/Ouroboros/Consensus/Genesis Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1+ ### Patch
2+
3+ - Used new ` AF.splitAtSlot ` function in GDD.
Original file line number Diff line number Diff line change @@ -302,7 +302,8 @@ densityDisconnect (GenesisWindow sgen) (SecurityParam k) states candidateSuffixe
302302 where
303303 densityBounds = do
304304 (peer, candidateSuffix) <- candidateSuffixes
305- let clippedFragment = dropBeyondGenesisWindow candidateSuffix
305+ let (clippedFragment, _) =
306+ AF. splitAtSlot firstSlotAfterGenesisWindow candidateSuffix
306307 state <- maybeToList (states Map. !? peer)
307308 -- Skip peers that haven't sent any headers yet.
308309 -- They should be disconnected by timeouts instead.
@@ -400,11 +401,6 @@ densityDisconnect (GenesisWindow sgen) (SecurityParam k) states candidateSuffixe
400401 firstSlotAfterGenesisWindow =
401402 succWithOrigin loeIntersectionSlot + SlotNo sgen
402403
403- -- This is performance sensitive. We used to call @takeWhileOldest@ here,
404- -- which would reconstruct much of the original fragment.
405- dropBeyondGenesisWindow =
406- AF. dropWhileNewest ((>= firstSlotAfterGenesisWindow) . blockSlot)
407-
408404-- Note [Chain disagreement]
409405-- ~~~~~~~~~~~~~~~~~~~~~~~~~
410406--
You can’t perform that action at this time.
0 commit comments