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

CSE-178 Reverse DB block order. #1131

Merged
merged 3 commits into from
Jul 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

, TxpHolderTag
, getUtxoModifier
, getLocalTxsNUndo
Expand Down