Skip to content

Commit

Permalink
Fixed CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zktony committed Feb 1, 2024
1 parent 9f9631d commit 8fd9050
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion pallets/thea-message-handler/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use parity_scale_codec::Encode;
use sp_core::Pair;
use sp_runtime::traits::BadOrigin;
use std::collections::BTreeMap;
use thea::ecdsa::AuthoritySignature;

#[test]
fn test_insert_authorities_full() {
Expand Down
2 changes: 1 addition & 1 deletion pallets/thea/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
let mut ext = sp_io::TestExternalities::new(t);
let seed = "12345678901234567890123456789012";
let validator = sp_core::ecdsa::Pair::from_seed(b"12345678901234567890123456789012");
let mut keystore = MemoryKeystore::new();
let keystore = MemoryKeystore::new();
keystore.insert(THEA, seed, validator.public().as_ref()).unwrap();
ext.register_extension(KeystoreExt::new(MemoryKeystore::new()));
ext.into()
Expand Down
9 changes: 3 additions & 6 deletions pallets/thea/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ fn set_200_validators() -> [Pair; 200] {
use crate::ecdsa::AuthorityPair as Pair;
use frame_support::traits::OneSessionHandler;
use polkadex_primitives::UNIT_BALANCE;
use sp_core::crypto::AccountId32;

#[test]
fn test_session_change() {
Expand Down Expand Up @@ -491,8 +490,6 @@ fn test_submit_signed_outgoing_messages_message_not_found() {
})
}

use frame_support::traits::ReservableCurrency;

#[test]
fn test_on_initialize_happy_path() {
new_test_ext().execute_with(|| {
Expand Down Expand Up @@ -606,12 +603,12 @@ fn test_validate_signed_outgoing_message_returns_custom_error() {
let signatures = vec![(network, nonce, signature.into())];
assert_noop!(
Thea::validate_signed_outgoing_message(&0, &validator_set_id, &signatures),
InvalidTransaction::Custom(2)
InvalidTransaction::Custom(3)
);
<SignedOutgoingNonce<Test>>::insert(network, nonce.saturating_sub(1));
<SignedOutgoingNonce<Test>>::insert(network, 50);
assert_noop!(
Thea::validate_signed_outgoing_message(&0, &validator_set_id, &signatures),
InvalidTransaction::Custom(3)
InvalidTransaction::Custom(2)
);
})
}
Expand Down

0 comments on commit 8fd9050

Please sign in to comment.