lastBlock :: Handler Hash
lastBlock = do
  thr <- fiveMinAgo
  found <- runDB $ selectFirst [LastBlockObtainedAt >=. thr] [Desc LastBlockObtainedAt]
  case found of
    Just (Entity _ lb) -> return $ Hash $ lastBlockHash lb
    Nothing -> getSaveLastBlock
lastBlock :: Handler Hash
lastBlock = do
  thr <- fiveMinAgo
  found <- runDB $ selectFirst [LastBlockObtainedAt >=. thr] [Desc LastBlockObtainedAt]
  case found of
    Just (Entity _ lb) -> return $ Hash $ lastBlockHash lb
    Nothing -> getSaveLastBlock
lastBlock = do
  thr <- fiveMinAgo
  found <- runDB $ selectFirst [LastBlockObtainedAt >=. thr] [Desc LastBlockObtainedAt]
  case found of
    Just (Entity _ lb) -> return $ Hash $ lastBlockHash lb
    Nothing -> getSaveLastBlock