@@ -295,6 +295,11 @@ data LocalCmdArgs = LocalCmdArgs
295295 , _localTxCmdArgs_shortOutput :: Bool
296296 } deriving (Eq ,Ord ,Show ,Read )
297297
298+ data PollCmdArgs = PollCmdArgs
299+ { _pollTxCmdArgs_txArgs :: NodeTxCmdArgs
300+ , _pollTxCmdArgs_shortOutput :: Bool
301+ } deriving (Eq ,Ord ,Show ,Read )
302+
298303nodeOptP :: Parser HostPort
299304nodeOptP = option (eitherReader (hostPortFromText . T. pack)) $ mconcat
300305 [ long " node"
@@ -329,6 +334,9 @@ nodeTxCmdP = NodeTxCmdArgs <$> many txFileP <*> optional schemeHostPortOptP
329334localCmdP :: Parser LocalCmdArgs
330335localCmdP = LocalCmdArgs <$> nodeTxCmdP <*> noVerifySigsP <*> shortOutputP
331336
337+ pollCmdP :: Parser PollCmdArgs
338+ pollCmdP = PollCmdArgs <$> nodeTxCmdP <*> shortOutputP
339+
332340noVerifySigsP :: Parser Bool
333341noVerifySigsP = flag True False $ mconcat
334342 [ long " no-verify-sigs"
@@ -455,7 +463,7 @@ data SubCommand
455463 | ListKeys (Either FilePath ChainweaverFile ) (Maybe KeyIndex )
456464 | Local LocalCmdArgs
457465 | Mempool SchemeHostPort ChainId (Maybe Text ) (Maybe Text )
458- | Poll NodeTxCmdArgs
466+ | Poll PollCmdArgs
459467 | Send NodeTxCmdArgs
460468 | Sign SignArgs
461469 | Verify VerifyArgs
@@ -576,7 +584,7 @@ nodeCommands :: Mod CommandFields SubCommand
576584nodeCommands = mconcat
577585 [ command " local" (info (Local <$> localCmdP)
578586 (progDesc " Test commands locally with a node's /local endpoint" ))
579- , command " poll" (info (Poll <$> nodeTxCmdP )
587+ , command " poll" (info (Poll <$> pollCmdP )
580588 (progDesc " Poll command results with a node's /poll endpoint" ))
581589 , command " send" (info (Send <$> nodeTxCmdP)
582590 (progDesc " Send commands to a node's /send endpoint" ))
0 commit comments