Skip to content

Commit

Permalink
chore: consistent naming prewitnessed
Browse files Browse the repository at this point in the history
  • Loading branch information
kylezs committed Oct 24, 2024
1 parent dc8bf3e commit f608abb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions state-chain/pallets/cf-ingress-egress/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ pub mod pallet {
/// Unsupported chain
UnsupportedChain,
/// Transaction cannot be reported after being pre-witnessed or boosted.
TransactionAlreadyPreWitnessed,
TransactionAlreadyPrewitnessed,
}

#[pallet::hooks]
Expand Down Expand Up @@ -1372,7 +1372,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
const UNSEEN: TaintedTransactionStatus = TaintedTransactionStatus::Unseen;
ensure!(
opt.replace(UNSEEN).unwrap_or_default() == UNSEEN,
Error::<T, I>::TransactionAlreadyPreWitnessed
Error::<T, I>::TransactionAlreadyPrewitnessed
);
Ok::<_, DispatchError>(())
})?;
Expand Down
6 changes: 3 additions & 3 deletions state-chain/pallets/cf-ingress-egress/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2121,7 +2121,7 @@ fn finalize_boosted_tx_if_tainted_after_prewitness() {

assert_noop!(
IngressEgress::mark_transaction_as_tainted(OriginTrait::signed(BROKER), tx_id.clone(),),
crate::Error::<Test, ()>::TransactionAlreadyPreWitnessed
crate::Error::<Test, ()>::TransactionAlreadyPrewitnessed
);

assert_ok!(IngressEgress::process_single_deposit(
Expand Down Expand Up @@ -2242,11 +2242,11 @@ fn can_not_report_transaction_after_witnessing() {
);
assert_noop!(
IngressEgress::mark_transaction_as_tainted(OriginTrait::signed(BROKER), prewitnessed,),
crate::Error::<Test, ()>::TransactionAlreadyPreWitnessed
crate::Error::<Test, ()>::TransactionAlreadyPrewitnessed
);
assert_noop!(
IngressEgress::mark_transaction_as_tainted(OriginTrait::signed(BROKER), boosted,),
crate::Error::<Test, ()>::TransactionAlreadyPreWitnessed
crate::Error::<Test, ()>::TransactionAlreadyPrewitnessed
);
});
}

0 comments on commit f608abb

Please sign in to comment.