mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Run cargo fmt on the whole code base (#9394)
* Run cargo fmt on the whole code base * Second run * Add CI check * Fix compilation * More unnecessary braces * Handle weights * Use --all * Use correct attributes... * Fix UI tests * AHHHHHHHHH * 🤦 * Docs * Fix compilation * 🤷 * Please stop * 🤦 x 2 * More * make rustfmt.toml consistent with polkadot Co-authored-by: André Silva <andrerfosilva@gmail.com>
This commit is contained in:
@@ -16,28 +16,22 @@
|
||||
// limitations under the License.
|
||||
|
||||
//! Integration tests for ecdsa
|
||||
use std::sync::Arc;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_core::{
|
||||
crypto::Pair,
|
||||
testing::ECDSA,
|
||||
};
|
||||
use sp_keystore::{
|
||||
SyncCryptoStore,
|
||||
testing::KeyStore,
|
||||
};
|
||||
use substrate_test_runtime_client::{
|
||||
TestClientBuilder, DefaultTestClientBuilderExt, TestClientBuilderExt,
|
||||
runtime::TestAPI,
|
||||
};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_application_crypto::ecdsa::{AppPair, AppPublic};
|
||||
use sp_core::{crypto::Pair, testing::ECDSA};
|
||||
use sp_keystore::{testing::KeyStore, SyncCryptoStore};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use std::sync::Arc;
|
||||
use substrate_test_runtime_client::{
|
||||
runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn ecdsa_works_in_runtime() {
|
||||
let keystore = Arc::new(KeyStore::new());
|
||||
let test_client = TestClientBuilder::new().set_keystore(keystore.clone()).build();
|
||||
let (signature, public) = test_client.runtime_api()
|
||||
let (signature, public) = test_client
|
||||
.runtime_api()
|
||||
.test_ecdsa_crypto(&BlockId::Number(0))
|
||||
.expect("Tests `ecdsa` crypto.");
|
||||
|
||||
|
||||
@@ -17,28 +17,22 @@
|
||||
|
||||
//! Integration tests for ed25519
|
||||
|
||||
use std::sync::Arc;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_core::{
|
||||
crypto::Pair,
|
||||
testing::ED25519,
|
||||
};
|
||||
use sp_keystore::{
|
||||
SyncCryptoStore,
|
||||
testing::KeyStore,
|
||||
};
|
||||
use substrate_test_runtime_client::{
|
||||
TestClientBuilder, DefaultTestClientBuilderExt, TestClientBuilderExt,
|
||||
runtime::TestAPI,
|
||||
};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_application_crypto::ed25519::{AppPair, AppPublic};
|
||||
use sp_core::{crypto::Pair, testing::ED25519};
|
||||
use sp_keystore::{testing::KeyStore, SyncCryptoStore};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use std::sync::Arc;
|
||||
use substrate_test_runtime_client::{
|
||||
runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn ed25519_works_in_runtime() {
|
||||
let keystore = Arc::new(KeyStore::new());
|
||||
let test_client = TestClientBuilder::new().set_keystore(keystore.clone()).build();
|
||||
let (signature, public) = test_client.runtime_api()
|
||||
let (signature, public) = test_client
|
||||
.runtime_api()
|
||||
.test_ed25519_crypto(&BlockId::Number(0))
|
||||
.expect("Tests `ed25519` crypto.");
|
||||
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
|
||||
//! Integration tests for application crypto
|
||||
|
||||
#[cfg(test)]
|
||||
mod ecdsa;
|
||||
#[cfg(test)]
|
||||
mod ed25519;
|
||||
#[cfg(test)]
|
||||
mod sr25519;
|
||||
#[cfg(test)]
|
||||
mod ecdsa;
|
||||
|
||||
@@ -17,28 +17,22 @@
|
||||
|
||||
//! Integration tests for sr25519
|
||||
|
||||
use std::sync::Arc;
|
||||
use sp_runtime::generic::BlockId;
|
||||
use sp_core::{
|
||||
crypto::Pair,
|
||||
testing::SR25519,
|
||||
};
|
||||
use sp_keystore::{
|
||||
SyncCryptoStore,
|
||||
testing::KeyStore,
|
||||
};
|
||||
use substrate_test_runtime_client::{
|
||||
TestClientBuilder, DefaultTestClientBuilderExt, TestClientBuilderExt,
|
||||
runtime::TestAPI,
|
||||
};
|
||||
use sp_api::ProvideRuntimeApi;
|
||||
use sp_application_crypto::sr25519::{AppPair, AppPublic};
|
||||
use sp_core::{crypto::Pair, testing::SR25519};
|
||||
use sp_keystore::{testing::KeyStore, SyncCryptoStore};
|
||||
use sp_runtime::generic::BlockId;
|
||||
use std::sync::Arc;
|
||||
use substrate_test_runtime_client::{
|
||||
runtime::TestAPI, DefaultTestClientBuilderExt, TestClientBuilder, TestClientBuilderExt,
|
||||
};
|
||||
|
||||
#[test]
|
||||
fn sr25519_works_in_runtime() {
|
||||
let keystore = Arc::new(KeyStore::new());
|
||||
let test_client = TestClientBuilder::new().set_keystore(keystore.clone()).build();
|
||||
let (signature, public) = test_client.runtime_api()
|
||||
let (signature, public) = test_client
|
||||
.runtime_api()
|
||||
.test_sr25519_crypto(&BlockId::Number(0))
|
||||
.expect("Tests `sr25519` crypto.");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user