Skip to content

Commit

Permalink
chore: consistent naming prewitnessed (#5351)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylezs authored and dandanlen committed Oct 30, 2024
1 parent 92da177 commit d547cfb
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 @@ -773,7 +773,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 @@ -1367,7 +1367,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 @@ -2208,7 +2208,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 @@ -2329,11 +2329,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 d547cfb

Please sign in to comment.