Skip to content

Commit

Permalink
Merge pull request #515 from input-output-hk/smelc/legacy-query-remov…
Browse files Browse the repository at this point in the history
…e-constitution-hash

legacy query: remove constitution-hash option
  • Loading branch information
smelc authored Dec 11, 2023
2 parents 89eea4d + a553194 commit a8bedc5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 47 deletions.
2 changes: 0 additions & 2 deletions cardano-cli/src/Cardano/CLI/Legacy/Commands/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import GHC.Generics
data LegacyQueryCmds
= QueryLeadershipScheduleCmd !LegacyQueryLeadershipScheduleCmdArgs
| QueryProtocolParametersCmd !LegacyQueryProtocolParametersCmdArgs
| QueryConstitutionHashCmd !LegacyQueryConstitutionHashCmdArgs
| QueryTipCmd !LegacyQueryTipCmdArgs
| QueryStakePoolsCmd !LegacyQueryStakePoolsCmdArgs
| QueryStakeDistributionCmd !LegacyQueryStakeDistributionCmdArgs
Expand Down Expand Up @@ -169,7 +168,6 @@ renderLegacyQueryCmds :: LegacyQueryCmds -> Text
renderLegacyQueryCmds = \case
QueryLeadershipScheduleCmd {} -> "query leadership-schedule"
QueryProtocolParametersCmd {} -> "query protocol-parameters "
QueryConstitutionHashCmd {} -> "query constitution-hash "
QueryTipCmd {} -> "query tip"
QueryStakePoolsCmd {} -> "query stake-pools"
QueryStakeDistributionCmd {} -> "query stake-distribution"
Expand Down
12 changes: 0 additions & 12 deletions cardano-cli/src/Cardano/CLI/Legacy/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,6 @@ pQueryCmds envCli =
[ subParser "protocol-parameters"
$ Opt.info pQueryProtocolParameters
$ Opt.progDesc "Get the node's current protocol parameters"
, subParser "constitution-hash"
$ Opt.info pQueryConstitutionHash
$ Opt.progDesc "Get the constitution hash"
, subParser "tip"
$ Opt.info pQueryTip
$ Opt.progDesc "Get the node's current tip (slot no, hash, block no)"
Expand Down Expand Up @@ -634,15 +631,6 @@ pQueryCmds envCli =
<*> pNetworkId envCli
<*> pMaybeOutputFile

pQueryConstitutionHash :: Parser LegacyQueryCmds
pQueryConstitutionHash =
fmap QueryConstitutionHashCmd $
LegacyQueryConstitutionHashCmdArgs
<$> pSocketPath envCli
<*> pConsensusModeParams
<*> pNetworkId envCli
<*> pMaybeOutputFile

pQueryTip :: Parser LegacyQueryCmds
pQueryTip =
fmap QueryTipCmd $
Expand Down
7 changes: 0 additions & 7 deletions cardano-cli/src/Cardano/CLI/Legacy/Run/Query.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ runLegacyQueryCmds :: Cmd.LegacyQueryCmds -> ExceptT QueryCmdError IO ()
runLegacyQueryCmds = \case
Cmd.QueryLeadershipScheduleCmd args -> runLegacyQueryLeadershipScheduleCmd args
Cmd.QueryProtocolParametersCmd args -> runLegacyQueryProtocolParametersCmd args
Cmd.QueryConstitutionHashCmd args -> runLegacyQueryConstitutionHashCmd args
Cmd.QueryTipCmd args -> runLegacyQueryTipCmd args
Cmd.QueryStakePoolsCmd args -> runLegacyQueryStakePoolsCmd args
Cmd.QueryStakeDistributionCmd args -> runLegacyQueryStakeDistributionCmd args
Expand All @@ -34,12 +33,6 @@ runLegacyQueryCmds = \case
Cmd.QueryTxMempoolCmd args -> runLegacyQueryTxMempoolCmd args
Cmd.QuerySlotNumberCmd args -> runLegacyQuerySlotNumberCmd args

runLegacyQueryConstitutionHashCmd :: ()
=> Cmd.LegacyQueryConstitutionHashCmdArgs
-> ExceptT QueryCmdError IO ()
runLegacyQueryConstitutionHashCmd Cmd.LegacyQueryConstitutionHashCmdArgs {..} =
EraBased.runQueryConstitutionHashCmd EraBased.QueryConstitutionHashCmdArgs {..}

runLegacyQueryProtocolParametersCmd :: ()
=> Cmd.LegacyQueryProtocolParametersCmdArgs
-> ExceptT QueryCmdError IO ()
Expand Down
22 changes: 0 additions & 22 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -8775,7 +8775,6 @@ Usage: cardano-cli legacy genesis hash --genesis FILE

Usage: cardano-cli legacy query
( protocol-parameters
| constitution-hash
| tip
| stake-pools
| stake-distribution
Expand Down Expand Up @@ -8804,16 +8803,6 @@ Usage: cardano-cli legacy query protocol-parameters --socket-path SOCKET_PATH

Get the node's current protocol parameters

Usage: cardano-cli legacy query constitution-hash --socket-path SOCKET_PATH
[--cardano-mode
[--epoch-slots SLOTS]]
( --mainnet
| --testnet-magic NATURAL
)
[--out-file FILE]

Get the constitution hash

Usage: cardano-cli legacy query tip --socket-path SOCKET_PATH
[--cardano-mode [--epoch-slots SLOTS]]
(--mainnet | --testnet-magic NATURAL)
Expand Down Expand Up @@ -10024,7 +10013,6 @@ Usage: cardano-cli genesis hash --genesis FILE

Usage: cardano-cli query
( protocol-parameters
| constitution-hash
| tip
| stake-pools
| stake-distribution
Expand Down Expand Up @@ -10053,16 +10041,6 @@ Usage: cardano-cli query protocol-parameters --socket-path SOCKET_PATH

Get the node's current protocol parameters

Usage: cardano-cli query constitution-hash --socket-path SOCKET_PATH
[--cardano-mode
[--epoch-slots SLOTS]]
( --mainnet
| --testnet-magic NATURAL
)
[--out-file FILE]

Get the constitution hash

Usage: cardano-cli query tip --socket-path SOCKET_PATH
[--cardano-mode [--epoch-slots SLOTS]]
(--mainnet | --testnet-magic NATURAL)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Usage: cardano-cli legacy query
( protocol-parameters
| constitution-hash
| tip
| stake-pools
| stake-distribution
Expand All @@ -24,7 +23,6 @@ Available options:

Available commands:
protocol-parameters Get the node's current protocol parameters
constitution-hash Get the constitution hash
tip Get the node's current tip (slot no, hash, block no)
stake-pools Get the node's current set of stake pool ids
stake-distribution Get the node's current aggregated stake distribution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Usage: cardano-cli query
( protocol-parameters
| constitution-hash
| tip
| stake-pools
| stake-distribution
Expand All @@ -24,7 +23,6 @@ Available options:

Available commands:
protocol-parameters Get the node's current protocol parameters
constitution-hash Get the constitution hash
tip Get the node's current tip (slot no, hash, block no)
stake-pools Get the node's current set of stake pool ids
stake-distribution Get the node's current aggregated stake distribution
Expand Down

0 comments on commit a8bedc5

Please sign in to comment.