Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1131 from input-output-hk/ksaric/CSE-178-Reverse-…
Browse files Browse the repository at this point in the history
…DB-block-order

CSE-178 Reverse DB block order.
  • Loading branch information
ksaric authored Jul 10, 2017
2 parents 536446d + 1d3e438 commit 97850b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Pos/Explorer/BListener.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import Pos.Explorer.DB (Page, Epoch)
import qualified Pos.Explorer.DB as DB
import Pos.Ssc.Class.Helpers (SscHelpersClass)
import Pos.Util.Chrono (NE, NewestFirst (..),
OldestFirst (..))
OldestFirst (..), toNewestFirst)

----------------------------------------------------------------------------
-- Declarations
Expand Down Expand Up @@ -329,7 +329,10 @@ onApplyKeyBlocksGeneral blunds newBlocksMapF = do
newBlocks = newBlocksMapF blocksNE

blocksNE :: NE (Block ssc)
blocksNE = fst <$> getOldestFirst blunds
blocksNE = fst <$> getNewestFirst blocksNewF

blocksNewF :: NewestFirst NE (Blund ssc)
blocksNewF = toNewestFirst blunds


-- A general @Key@ @Block@ database application for the rollback call.
Expand Down
1 change: 1 addition & 0 deletions txp/Pos/Txp/MemState/Class.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
module Pos.Txp.MemState.Class
( MonadTxpMem
, askTxpMem
, askTxpMemAndMetrics
, TxpHolderTag
, getUtxoModifier
, getLocalTxsNUndo
Expand Down

0 comments on commit 97850b1

Please sign in to comment.