| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Hydra.Node.State
Synopsis
- type PendingDeposits tx = Map (TxIdType tx) (Deposit tx)
- data ChainPointTime = ChainPointTime {
- currentSlot :: ChainSlot
- currentChainTime :: UTCTime
- drift :: NominalDiffTime
- data NodeState tx
- = NodeInSync { }
- | NodeCatchingUp { }
- initNodeState :: IsChainState tx => ChainStateType tx -> NodeState tx
- initialChainPointTime :: IsChainState tx => ChainStateType tx -> ChainPointTime
- initialChainTime :: UTCTime
- data SyncedStatus
- = InSync
- | CatchingUp
- syncedStatus :: NodeState tx -> SyncedStatus
- data Deposit tx = Deposit {}
- data DepositStatus
- depositsForHead :: HeadId -> PendingDeposits tx -> PendingDeposits tx
Documentation
type PendingDeposits tx = Map (TxIdType tx) (Deposit tx) Source #
data ChainPointTime Source #
Constructors
| ChainPointTime | |
Fields
| |
Instances
Constructors
| NodeInSync | Normal operation of the node where it is connected and has a recent view of the chain. |
Fields
| |
| NodeCatchingUp | Node is catching up on its view of the chain and should behave differently. |
Fields
| |
Instances
| (IsTx tx, FromJSON (ChainStateType tx)) => FromJSON (NodeState tx) Source # | |
Defined in Hydra.Node.State Methods parseJSON :: Value -> Parser (NodeState tx) parseJSONList :: Value -> Parser [NodeState tx] omittedField :: Maybe (NodeState tx) | |
| (IsTx tx, ToJSON (ChainStateType tx)) => ToJSON (NodeState tx) Source # | |
Defined in Hydra.Node.State Methods toJSON :: NodeState tx -> Value toEncoding :: NodeState tx -> Encoding toJSONList :: [NodeState tx] -> Value toEncodingList :: [NodeState tx] -> Encoding | |
| Generic (NodeState tx) Source # | |
| (IsTx tx, Show (ChainStateType tx)) => Show (NodeState tx) Source # | |
| IsChainState tx => FromCBOR (NodeState tx) Source # | |
| IsChainState tx => ToCBOR (NodeState tx) Source # | |
Defined in Hydra.Node.State Methods toCBOR :: NodeState tx -> Encoding encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (NodeState tx) -> Size encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [NodeState tx] -> Size | |
| (IsTx tx, Eq (ChainStateType tx)) => Eq (NodeState tx) Source # | |
| type Rep (NodeState tx) Source # | |
Defined in Hydra.Node.State type Rep (NodeState tx) = D1 ('MetaData "NodeState" "Hydra.Node.State" "hydra-node-2.3.0-1cgalYNmLJQC1YXlYVq7mp" 'False) (C1 ('MetaCons "NodeInSync" 'PrefixI 'True) (S1 ('MetaSel ('Just "headState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HeadState tx)) :*: (S1 ('MetaSel ('Just "pendingDeposits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PendingDeposits tx)) :*: S1 ('MetaSel ('Just "chainPointTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChainPointTime))) :+: C1 ('MetaCons "NodeCatchingUp" 'PrefixI 'True) (S1 ('MetaSel ('Just "headState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HeadState tx)) :*: (S1 ('MetaSel ('Just "pendingDeposits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PendingDeposits tx)) :*: S1 ('MetaSel ('Just "chainPointTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ChainPointTime)))) | |
initNodeState :: IsChainState tx => ChainStateType tx -> NodeState tx Source #
initialChainPointTime :: IsChainState tx => ChainStateType tx -> ChainPointTime Source #
data SyncedStatus Source #
Constructors
| InSync | |
| CatchingUp |
Instances
syncedStatus :: NodeState tx -> SyncedStatus Source #
A deposit tracked by the protocol. The DepositStatus determines whether
it may be used for an incremental commit or not.
Constructors
| Deposit | |
Instances
data DepositStatus Source #
Instances
depositsForHead :: HeadId -> PendingDeposits tx -> PendingDeposits tx Source #