@@ -72,19 +72,19 @@ module Haskoin.Block.Headers (
7272import Control.Applicative ((<|>) )
7373import Control.DeepSeq
7474import Control.Monad (guard , mzero , unless , when )
75- import Control.Monad.Except (
75+ import Control.Monad.Trans.Class (lift )
76+ import Control.Monad.Trans.Except (
7677 ExceptT (.. ),
7778 runExceptT ,
78- throwError ,
79+ throwE ,
7980 )
80- import Control.Monad.State.Strict as State (
81+ import Control.Monad.Trans.Maybe
82+ import Control.Monad.Trans.State.Strict as State (
8183 StateT ,
8284 get ,
8385 gets ,
84- lift ,
8586 modify ,
8687 )
87- import Control.Monad.Trans.Maybe
8888import Data.Binary (Binary (.. ))
8989import Data.Bits (shiftL , shiftR , (.&.) )
9090import qualified Data.ByteString as B
@@ -332,7 +332,7 @@ connectBlocks _ _ [] = return $ Right []
332332connectBlocks net t bhs@ (bh : _) =
333333 runExceptT $ do
334334 unless (chained bhs) $
335- throwError " Blocks to connect do not form a chain"
335+ throwE " Blocks to connect do not form a chain"
336336 par <-
337337 maybeToExceptT
338338 " Could not get parent block"
@@ -356,13 +356,13 @@ connectBlocks net t bhs@(bh : _) =
356356 case skM of
357357 Just sk -> return sk
358358 Nothing ->
359- throwError $
359+ throwE $
360360 " BUG: Could not get skip for block "
361361 ++ show (headerHash $ nodeHeader par)
362362 | otherwise = do
363363 let sn = ls !! fromIntegral (nodeHeight par - sh)
364364 when (nodeHeight sn /= sh) $
365- throwError " BUG: Node height not right in skip"
365+ throwE " BUG: Node height not right in skip"
366366 return sn
367367 where
368368 sh = skipHeight (nodeHeight par + 1 )
@@ -403,7 +403,7 @@ connectBlock net t bh =
403403 case skM of
404404 Just sk -> return sk
405405 Nothing ->
406- throwError $
406+ throwE $
407407 " BUG: Could not get skip for block "
408408 ++ show (headerHash $ nodeHeader par)
409409 bb <- lift getBestBlockHeader
0 commit comments