Skip to content

Commit 0da6ea1

Browse files
committed
ChainDB q-s-m: remove references to in-future blocks
The notion of blocks from the future has been completely eliminated from the ChainDB in #1269, so remove any stale (implicit) references.
1 parent ffc3c2d commit 0da6ea1

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/Model.hs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,14 +842,7 @@ validate cfg Model{initLedger, invalid} chain =
842842
ledger
843843
(invalid <> mkInvalid b e)
844844
-- Valid block according to the ledger
845-
Right ledger'
846-
-- But the block has been recorded as an invalid block. It must be
847-
-- that it exceeded the clock skew in the past.
848-
| Map.member (blockHash b) invalid ->
849-
ValidatedChain validPrefix ledger invalid
850-
-- This is the good path
851-
| otherwise ->
852-
go (convertMapKind ledger') (validPrefix :> b) bs'
845+
Right ledger' -> go (convertMapKind ledger') (validPrefix :> b) bs'
853846

854847
chains ::
855848
forall blk.

ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/StateMachine.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
-- These are the main tests for the chain DB. Commands include
2626
--
2727
-- * Add a block
28-
-- * Add a block with a @SlotNo@ that is ahead of the wall-clock.
2928
-- * Get the current chain and/or ledger state
3029
-- * Create a new iterator and use it to stream blocks
3130
-- * Create a new follower and use it to follow the chain
@@ -178,9 +177,7 @@ import Test.Util.WithEq
178177

179178
-- | Commands
180179
data Cmd blk it flr
181-
= -- | Advance the current slot to the block's slot (unless smaller than the
182-
-- current slot), add the block and run chain selection.
183-
AddBlock blk
180+
= AddBlock blk
184181
| GetCurrentChain
185182
| GetTipBlock
186183
| GetTipHeader

0 commit comments

Comments
 (0)