Skip to content

Commit

Permalink
fix error name: NoSuchChannel -> AlreadySubscribedToChannel (linera-i…
Browse files Browse the repository at this point in the history
  • Loading branch information
ma2bd authored Jan 28, 2024
1 parent 7b9aa01 commit e09d927
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions linera-execution/src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,13 +429,13 @@ pub enum SystemExecutionError {
#[error("Failed to remove committee")]
InvalidCommitteeRemoval,
#[error(
"Attempted to subscribe to the admin channel ({1}) of this chain's ({0}) admin chain {1}"
"Chain {0} tried to subscribe to the admin channel ({1}) of a chain that is not the admin chain"
)]
InvalidAdminSubscription(ChainId, SystemChannel),
#[error("Attempted to subscribe to self on channel {1} on chain {0}")]
#[error("Cannot subscribe to a channel ({1}) on the same chain ({0})")]
SelfSubscription(ChainId, SystemChannel),
#[error("Attempted to subscribe to a channel which does not exist ({1}) on chain {0}")]
NoSuchChannel(ChainId, SystemChannel),
#[error("Chain {0} tried to subscribe to channel {1} but it is already subscribed")]
AlreadySubscribedToChannel(ChainId, SystemChannel),
#[error("Invalid unsubscription request to channel {1} on chain {0}")]
InvalidUnsubscription(ChainId, SystemChannel),
#[error("Amount overflow")]
Expand Down Expand Up @@ -716,7 +716,7 @@ where
};
ensure!(
!self.subscriptions.contains(&subscription).await?,
SystemExecutionError::NoSuchChannel(context.chain_id, channel)
SystemExecutionError::AlreadySubscribedToChannel(context.chain_id, channel)
);
self.subscriptions.insert(&subscription)?;
let message = RawOutgoingMessage {
Expand Down

0 comments on commit e09d927

Please sign in to comment.