File tree 5 files changed +11
-18
lines changed
cardano-cli/src/Cardano/CLI
Governance/GenesisKeyDelegationCertificate
5 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ module Cardano.CLI.Compatible.Exception
10
10
, fromEitherCli
11
11
, fromEitherIOCli
12
12
, fromExceptTCli
13
- , readFileCli
14
13
)
15
14
where
16
15
@@ -70,6 +69,3 @@ fromExceptTCli
70
69
=> ExceptT e IO a
71
70
-> m a
72
71
fromExceptTCli = withFrozenCallStack $ fromEitherIOCli . runExceptT
73
-
74
- readFileCli :: (HasCallStack , MonadIO m ) => FilePath -> m ByteString
75
- readFileCli = withFrozenCallStack . readFileBinary
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ import Cardano.CLI.EraIndependent.Node.Run
56
56
, runNodeKeyGenVrfCmd
57
57
)
58
58
import Cardano.CLI.IO.Lazy qualified as Lazy
59
+ import Cardano.CLI.Read
59
60
import Cardano.CLI.Type.Common
60
61
import Cardano.CLI.Type.Error.GenesisCmdError
61
62
import Cardano.CLI.Type.Error.NodeCmdError
Original file line number Diff line number Diff line change @@ -33,25 +33,14 @@ runGovernanceGenesisKeyDelegationCertificate
33
33
vrfVkOrHashOrFp
34
34
oFp = do
35
35
genesisVkHash <-
36
- <<<<<<< HEAD
37
- modifyError GovernanceCmdKeyReadError $
38
- readVerificationKeyOrHashOrTextEnvFile genVkOrHashOrFp
39
- genesisDelVkHash <-
40
- modifyError GovernanceCmdKeyReadError $
41
- readVerificationKeyOrHashOrTextEnvFile genDelVkOrHashOrFp
42
- vrfVkHash <-
43
- modifyError GovernanceCmdKeyReadError $
44
- readVerificationKeyOrHashOrFile vrfVkOrHashOrFp
45
- =======
46
36
fromExceptTCli $
47
- readVerificationKeyOrHashOrTextEnvFile AsGenesisKey genVkOrHashOrFp
37
+ readVerificationKeyOrHashOrTextEnvFile genVkOrHashOrFp
48
38
genesisDelVkHash <-
49
39
fromExceptTCli $
50
- readVerificationKeyOrHashOrTextEnvFile AsGenesisDelegateKey genDelVkOrHashOrFp
40
+ readVerificationKeyOrHashOrTextEnvFile genDelVkOrHashOrFp
51
41
vrfVkHash <-
52
42
fromExceptTCli $
53
- readVerificationKeyOrHashOrFile AsVrfKey vrfVkOrHashOrFp
54
- >>>>>>> 9730 c5720 (Convert runGovernanceCmds to use CIO e () )
43
+ readVerificationKeyOrHashOrFile vrfVkOrHashOrFp
55
44
56
45
let req = GenesisKeyDelegationRequirements stb genesisVkHash genesisDelVkHash vrfVkHash
57
46
genKeyDelegCert = makeGenesisKeyDelegationCertificate req
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import Cardano.CLI.EraBased.Governance.GenesisKeyDelegationCertificate.Run
23
23
import Cardano.CLI.EraBased.Governance.Run
24
24
import Cardano.CLI.Legacy.Governance.Command
25
25
import Cardano.CLI.Orphan ()
26
+ import Cardano.CLI.Read
26
27
import Cardano.CLI.Type.Common
27
28
import Cardano.CLI.Type.Error.GovernanceCmdError
28
29
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ module Cardano.CLI.Read
96
96
97
97
-- * Genesis hashes
98
98
, readShelleyOnwardsGenesisAndHash
99
+ , readFileCli
99
100
)
100
101
where
101
102
@@ -127,6 +128,7 @@ import Cardano.Crypto.Hash qualified as Crypto
127
128
import Cardano.Ledger.Api qualified as L
128
129
import Cardano.Ledger.Hashes qualified as L
129
130
131
+ import RIO (readFileBinary )
130
132
import Prelude
131
133
132
134
import Control.Exception (bracket )
@@ -151,6 +153,7 @@ import Data.Text.Encoding.Error qualified as Text
151
153
import Data.Word
152
154
import GHC.IO.Handle (hClose , hIsSeekable )
153
155
import GHC.IO.Handle.FD (openFileBlocking )
156
+ import GHC.Stack
154
157
import Options.Applicative qualified as Opt
155
158
import System.IO (IOMode (ReadMode ))
156
159
@@ -1059,3 +1062,6 @@ getVerificationKeyFromStakePoolVerificationKeySource = \case
1059
1062
[ FromSomeType (AsVerificationKey AsStakePoolKey ) AnyStakePoolNormalVerificationKey
1060
1063
, FromSomeType (AsVerificationKey AsStakePoolExtendedKey ) AnyStakePoolExtendedVerificationKey
1061
1064
]
1065
+
1066
+ readFileCli :: (HasCallStack , MonadIO m ) => FilePath -> m ByteString
1067
+ readFileCli = withFrozenCallStack . readFileBinary
You can’t perform that action at this time.
0 commit comments