Skip to content

Commit

Permalink
Improve identity error log message
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Jan 4, 2022
1 parent 9e02b1c commit e40c3a4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bee-node/config.chrysalis-comnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duplicate this file to config.toml to use it

identity = ""
# identity = ""
alias = "bee"
bech32_hrp = "atoi"
network_id = "comnet1"
Expand Down
2 changes: 1 addition & 1 deletion bee-node/config.chrysalis-devnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duplicate this file to config.toml to use it

identity = ""
# identity = ""
alias = "bee"
bech32_hrp = "atoi"
network_id = "chrysalis-devnet"
Expand Down
2 changes: 1 addition & 1 deletion bee-node/config.chrysalis-mainnet.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Duplicate this file to config.toml to use it

identity = ""
# identity = ""
alias = "bee"
bech32_hrp = "iota"
network_id = "chrysalis-mainnet"
Expand Down
2 changes: 1 addition & 1 deletion bee-node/src/fullnode/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ fn add_node_resources<S: NodeStorageBackend>(builder: FullNodeBuilder<S>) -> Res
.set_health(StorageHealth::Healthy)
.map_err(|e| CoreError::StorageBackend(Box::new(e)))?;

return Err(FullNodeError::InvalidIdentityPrivateKey(
return Err(FullNodeError::InvalidOrNoIdentityPrivateKey(
builder.config().local().encoded().to_string(),
));
}
Expand Down
4 changes: 2 additions & 2 deletions bee-node/src/fullnode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use std::any::{type_name, Any, TypeId};
/// Full node related errors.
#[derive(Debug, thiserror::Error)]
pub enum FullNodeError {
#[error("invalid identity private key '{0}'")]
InvalidIdentityPrivateKey(String),
#[error("invalid or no identity private key provided. Add the newly generated `identity = \"{0}\"` (or generate one with `bee p2p-identity`) to the configuration file and re-run the node.")]
InvalidOrNoIdentityPrivateKey(String),
#[error("{0}")]
GossipLayerInitialization(#[from] bee_gossip::Error),
#[error("{0}")]
Expand Down

0 comments on commit e40c3a4

Please sign in to comment.