cardano-sl-0.4.3: Cardano SL main implementation

Safe HaskellNone
LanguageHaskell2010

Pos.Context

Contents

Synopsis

Documentation

type WithNodeContext ssc = MonadReader ContextTag (NodeContext ssc) Source #

Class for something that has NodeContext inside.

data NodeContext ssc Source #

NodeContext contains runtime context of node.

Constructors

NodeContext 

Fields

ncPublicKey :: NodeContext ssc -> PublicKey Source #

Generate PublicKey from SecretKey of NodeContext.

ncPubKeyAddress :: NodeContext ssc -> Address Source #

Generate Address from SecretKey of NodeContext

data NodeParams Source #

Contains algorithm specific & storage parameters for Node.

Constructors

NodeParams 

Fields

data BaseParams Source #

Contains basic & networking parameters for running node.

Constructors

BaseParams 

Fields

Genesis

Block semaphore.

LRC synchronization

waitLrc :: (MonadIO m, HasContext LrcContext m) => EpochIndex -> m () Source #

Block until LRC data is available for given epoch.

Misc

getUptime :: (MonadIO m, WithNodeContext ssc m) => m Microsecond Source #

Returns node uptime based on current time and ncStartTime.

isRecoveryMode :: (MonadIO m, WithNodeContext ssc m) => m Bool Source #

Returns if ncRecoveryHeader is Just which is equivalent to "we're in recovery mode".

type ContextHolder ssc = ContextHolder' (ContextHolderTrans ssc) Source #

Wrapper for monadic action which brings NodeContext.

runContextHolder :: NodeContext ssc -> ContextHolder ssc m a -> m a Source #

Run ContextHolder action.