block :: Handler Block
block = do
  recent <- recentBlock
  case recent of
    Just bl -> return bl
    Nothing -> do
      lb <- liftIO lastB
      case lb of
        Nothing -> notFound
        Just h -> do
          hashBlock h
block :: Handler Block
block = do
  recent <- recentBlock
  case recent of
    Just bl -> return bl
    Nothing -> do
      lb <- liftIO lastB
      case lb of
        Nothing -> notFound
        Just h -> do
          hashBlock h
block = do
  recent <- recentBlock
  case recent of
    Just bl -> return bl
    Nothing -> do
      lb <- liftIO lastB
      case lb of
        Nothing -> notFound
        Just h -> do
          hashBlock h