diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03aab46fe..ac444e867 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,7 +149,6 @@ jobs: chain_tests, dispatch_errors_tests, frame_system_tests, - keystore_tests, pallet_balances_tests, pallet_transaction_payment_tests, state_tests, diff --git a/src/api/rpc_api/events.rs b/src/api/rpc_api/events.rs index 16a7c23df..902800654 100644 --- a/src/api/rpc_api/events.rs +++ b/src/api/rpc_api/events.rs @@ -372,9 +372,9 @@ mod tests { let xt2: Bytes = UncheckedExtrinsic::new_unsigned(call2).encode().into(); let xt3: Bytes = UncheckedExtrinsic::new_unsigned(call3).encode().into(); - let xt_hash1 = ::Hasher::hash(&xt1); - let xt_hash2 = ::Hasher::hash(&xt2); - let xt_hash3 = ::Hasher::hash(&xt3); + let xt_hash1 = ::Hasher::hash(&xt1.0); + let xt_hash2 = ::Hasher::hash(&xt2.0); + let xt_hash3 = ::Hasher::hash(&xt3.0); let block = Block { header: default_header(), extrinsics: vec![xt1, xt2, xt3] }; let signed_block = SignedBlock { block, justifications: None }; diff --git a/testing/examples/keystore_tests.rs b/testing/examples/keystore_tests.rs deleted file mode 100644 index 041b0e8b7..000000000 --- a/testing/examples/keystore_tests.rs +++ /dev/null @@ -1,43 +0,0 @@ -/* - Copyright 2019 Supercomputing Systems AG - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -//! Tests for the author rpc interface functions. - -use sp_application_crypto::sr25519; -use sp_core::crypto::{KeyTypeId, Ss58Codec}; -use std::path::PathBuf; -use substrate_client_keystore::{Keystore, KeystoreExt, LocalKeystore}; - -pub const KEYSTORE_PATH: &str = "my_keystore"; -pub const SR25519: KeyTypeId = KeyTypeId(*b"sr25"); - -#[tokio::main] -async fn main() { - let store = LocalKeystore::open(PathBuf::from(&KEYSTORE_PATH), None).unwrap(); - let seed = "//Ferdie"; - - // This does not place the key into the keystore if we have a seed, but it does - // place it into the keystore if the seed is none. - let key = store.sr25519_generate_new(SR25519, Some(seed)).unwrap(); - store.insert(SR25519, seed, &key.0).unwrap(); - - drop(store); - println!("{}", key.to_ss58check()); - - let store = LocalKeystore::open(PathBuf::from(&KEYSTORE_PATH), None).unwrap(); - let pubkeys = store.public_keys::().unwrap(); - - assert_eq!(pubkeys[0].to_ss58check(), key.to_ss58check()); -}