Skip to content

Commit c8e1c17

Browse files
committed
clarification comment about hardcoded epoch slots
1 parent d8d4b53 commit c8e1c17

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/BotPlutusInterface/QueryNode.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,15 @@ flattenQueryResult = \case
7777
connectionInfo :: NodeInfo -> C.LocalNodeConnectInfo C.CardanoMode
7878
connectionInfo (NodeInfo netId socket) =
7979
C.LocalNodeConnectInfo
80-
( C.CardanoModeParams
81-
(C.EpochSlots 21600) -- TODO: this probably should be settable somehow?
82-
)
80+
(C.CardanoModeParams epochSlots)
8381
netId
8482
socket
83+
where
84+
-- This parameter needed only for the Byron era. Since the Byron
85+
-- era is over and the parameter has never changed it is ok to
86+
-- hardcode this. See comment on `Cardano.Api.ConsensusModeParams` in
87+
-- cardano-node.
88+
epochSlots = C.EpochSlots 21600
8589

8690
toQueryError :: Show e => e -> NodeQueryError
8791
toQueryError = NodeQueryError . pack . show

0 commit comments

Comments
 (0)