mineBlockFrom :: (MonadIO m) => Block -> String -> m Block
mineBlockFrom lastBlock stringData = do
  time <- liftIO epoch
  let block = Block { index        = index lastBlock + 1
                    , previousHash = blockHash lastBlock
                    , timestamp    = time
                    , blockData    = stringData
                    , nonce        = 0
                    , blockHash    = "will be changed"
                    }
  return $ setNonceAndHash block
mineBlockFrom :: (MonadIO m) => Block -> String -> m Block
mineBlockFrom lastBlock stringData = do
  time <- liftIO epoch
  let block = Block { index        = index lastBlock + 1
                    , previousHash = blockHash lastBlock
                    , timestamp    = time
                    , blockData    = stringData
                    , nonce        = 0
                    , blockHash    = "will be changed"
                    }
  return $ setNonceAndHash block
mineBlockFrom lastBlock stringData = do
  time <- liftIO epoch
  let block = Block { index        = index lastBlock + 1
                    , previousHash = blockHash lastBlock
                    , timestamp    = time
                    , blockData    = stringData
                    , nonce        = 0
                    , blockHash    = "will be changed"
                    }
  return $ setNonceAndHash block