Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type TxPool = [CardanoTx]
- data MockNodeServerChainState = MockNodeServerChainState { }
- txPool :: Lens' MockNodeServerChainState TxPool
- tip :: Lens' MockNodeServerChainState ( Maybe Block)
- index :: Lens' MockNodeServerChainState UtxoIndex
- currentSlot :: Lens' MockNodeServerChainState Slot
- channel :: Lens' MockNodeServerChainState ( TChan Block)
- emptyChainState :: MonadIO m => m MockNodeServerChainState
- getChannel :: MonadIO m => MVar MockNodeServerChainState -> m ( TChan Block)
- fromEmulatorChainState :: MonadIO m => ChainState -> m MockNodeServerChainState
- getTip :: forall m. MonadIO m => MVar MockNodeServerChainState -> m Block
- handleControlChain :: ( Member ( State MockNodeServerChainState ) effs, Member ( LogMsg ChainEvent ) effs, LastMember m effs, MonadIO m) => Params -> ChainControlEffect ~> Eff effs
- handleChain :: Member ( State MockNodeServerChainState ) effs => Params -> ChainEffect ~> Eff effs
- logEvent :: Member ( LogMsg ChainEvent ) effs => ChainEvent -> Eff effs ()
- addTxToPool :: CardanoTx -> TxPool -> TxPool
- chainNewestFirst :: forall m. MonadIO m => TChan Block -> m [Block]
Documentation
data MockNodeServerChainState Source #
Instances
Show MockNodeServerChainState Source # | |
Defined in Cardano.Chain |
|
Generic MockNodeServerChainState Source # | |
Defined in Cardano.Chain |
|
type Rep MockNodeServerChainState Source # | |
Defined in Cardano.Chain
type
Rep
MockNodeServerChainState
=
D1
('
MetaData
"MockNodeServerChainState" "Cardano.Chain" "plutus-pab-1.2.0.0-CtfsFiD4ohhEkbPm9mkCAB" '
False
) (
C1
('
MetaCons
"MockNodeServerChainState" '
PrefixI
'
True
) ((
S1
('
MetaSel
('
Just
"_txPool") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
TxPool
)
:*:
S1
('
MetaSel
('
Just
"_index") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
UtxoIndex))
:*:
(
S1
('
MetaSel
('
Just
"_currentSlot") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
Slot)
:*:
(
S1
('
MetaSel
('
Just
"_channel") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
TChan
Block))
:*:
S1
('
MetaSel
('
Just
"_tip") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
(
Maybe
Block))))))
|
index :: Lens' MockNodeServerChainState UtxoIndex Source #
currentSlot :: Lens' MockNodeServerChainState Slot Source #
emptyChainState :: MonadIO m => m MockNodeServerChainState Source #
getChannel :: MonadIO m => MVar MockNodeServerChainState -> m ( TChan Block) Source #
fromEmulatorChainState :: MonadIO m => ChainState -> m MockNodeServerChainState Source #
Build a PAB ChainState from a emulator ChainState
handleControlChain :: ( Member ( State MockNodeServerChainState ) effs, Member ( LogMsg ChainEvent ) effs, LastMember m effs, MonadIO m) => Params -> ChainControlEffect ~> Eff effs Source #
handleChain :: Member ( State MockNodeServerChainState ) effs => Params -> ChainEffect ~> Eff effs Source #
logEvent :: Member ( LogMsg ChainEvent ) effs => ChainEvent -> Eff effs () Source #
addTxToPool :: CardanoTx -> TxPool -> TxPool Source #
chainNewestFirst :: forall m. MonadIO m => TChan Block -> m [Block] Source #
Fetch the currently stored chain by iterating over the channel until there is nothing left to be returned.