Skip to content

Commit

Permalink
[refactor]: chore
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Balashov <[email protected]>
  • Loading branch information
0x009922 committed Dec 17, 2023
1 parent bcddbb4 commit 24efb38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ impl Default for ConfigurationProxy {
}

/// Parsed variant of the (user provided) [`Configuration`]
// TODO: incorporate this struct into the final, parsed configuration
// https://github.com/hyperledger/iroha/issues/3500
pub enum ParsedConfiguration {
/// The peer can only observe the genesis block
View {
Default {
/// Genesis account public key
public_key: PublicKey,
},
Expand All @@ -58,7 +60,7 @@ impl Configuration {
/// See [`ParseError`]
pub fn parse(self, submit: bool) -> Result<ParsedConfiguration, ParseError> {
match (self.private_key, self.file, submit) {
(None, None, false) => Ok(ParsedConfiguration::View {
(None, None, false) => Ok(ParsedConfiguration::Default {
public_key: self.public_key,
}),
(Some(private_key), Some(file), true) => {
Expand Down

0 comments on commit 24efb38

Please sign in to comment.