ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Node.Recovery

Synopsis

Documentation

createMarkerOnCleanShutdown Source #

Arguments

:: IOLike m 
=> HasFS m h 
-> m a

Action to run

-> m a 

When the given action terminates with a clean exception, create the clean shutdown marker file.

NOTE: we assume the action (i.e., the node itself) never terminates without an exception.

A clean exception is an exception for exceptionRequiresRecovery returns False.

hasCleanShutdownMarker :: HasFS m h -> m Bool Source #

Return True when cleanShutdownMarkerFile exists.

createCleanShutdownMarker :: IOLike m => HasFS m h -> m () Source #

Create the cleanShutdownMarkerFile.

Idempotent.

removeCleanShutdownMarker :: HasFS m h -> m () Source #

Remove cleanShutdownMarkerFile.

Will throw an FsResourceDoesNotExist error when it does not exist.