[input-output-hk/cardano-sl] [CBR-387] Add `getSlotStart` to the node adaptor (#3433)

edsko commented on this pull request.

> @@ -253,9 +262,10 @@ instance (NodeConstraints, MonadIO m) => MonadSlots Res (WithNodeState m) where
newNodeStateAdaptor :: forall m ext. (NodeConstraints, MonadIO m, MonadMask m)
=> NodeResources ext -> NodeStateAdaptor m
newNodeStateAdaptor nr = Adaptor {
— withNodeState = run
— , getTipSlotId = run $ \_lock -> defaultGetTipSlotId
— , getMaxTxSize = run $ \_lock -> defaultGetMaxTxSize
+ withNodeState = run
+ , getTipSlotId = run $ \_lock -> defaultGetTipSlotId
+ , getMaxTxSize = run $ \_lock -> defaultGetMaxTxSize

Context would have clarified :)

«`haskell
withNodeState = run
, getTipSlotId = run $ \_lock -> defaultGetTipSlotId
, getMaxTxSize = run $ \_lock -> defaultGetMaxTxSize
, getSlotStart = \slotId -> run $ \_lock -> defaultGetSlotStart slotId
«`

Добавить комментарий