Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #983

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions protocol-units/bridge/util/src/states.rs
Original file line number Diff line number Diff line change
@@ -85,14 +85,14 @@ impl TransferState {
// already present invalid
Err(InvalidEventError::InitAnAlreadyExist)
}
// Lock event must on on the counter part chain.
// Lock event must be on the counter part chain.
(BridgeContractEvent::Locked(_), TransferStateType::Initialized) => (event.chain
!= self.init_chain)
.then_some(())
.ok_or(InvalidEventError::BadChain),
// Lock event is only applied on Initialized swap state
(BridgeContractEvent::Locked(details), _) => Err(InvalidEventError::BadEvent(format!("Received a locked event with state not Initialized, transfer_id: {} state:{} details: {details:?}", self.transfer_id, self.state))),
// CounterPartCompleted event must on on the counter part chain.
// CounterPartCompleted event must be on the counter part chain.
(BridgeContractEvent::CounterPartyCompleted(_, _), TransferStateType::Locked) => {
(event.chain != self.init_chain)
.then_some(())
@@ -102,7 +102,7 @@ impl TransferState {
(BridgeContractEvent::CounterPartyCompleted(_, _), _) => {
Err(InvalidEventError::BadEvent(format!("Received a CounterPartCompleted event with state not Locked, transfer_id: {} state:{}", self.transfer_id, self.state)))
}
// InitiatorCompleted event must on on the init chain.
// InitiatorCompleted event must be on the init chain.
(BridgeContractEvent::InitiatorCompleted(_), TransferStateType::SecretReceived) => {
(event.chain == self.init_chain)
.then_some(())
2 changes: 1 addition & 1 deletion util/movement-algs/src/grouping_heuristic/mod.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ use std::fmt::Debug;
/// A failure type for a single member of the heuristically formed group.
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum ElementalFailure<T> {
/// An instrumental failure is intended to be be passed on in future iterations.
/// An instrumental failure is intended to be passed on in future iterations.
Instrumental(T),
/// A terminal failure is intended to be dropped or pause the execution altogether.
Terminal(T),