mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 23:21:06 +00:00
Typo + some clippy stuff (unnecessary clone/to_string/refs) + fmt (#1437)
This commit is contained in:
@@ -136,8 +136,7 @@ impl InitBlockBuilder for Client {
|
||||
validation_data: Option<PersistedValidationData<PHash, PBlockNumber>>,
|
||||
relay_sproof_builder: RelayStateSproofBuilder,
|
||||
) -> BlockBuilder<Block, Client, Backend> {
|
||||
let last_timestamp =
|
||||
self.runtime_api().get_last_timestamp(&at).expect("Get last timestamp");
|
||||
let last_timestamp = self.runtime_api().get_last_timestamp(at).expect("Get last timestamp");
|
||||
|
||||
let timestamp = last_timestamp + cumulus_test_runtime::MinimumPeriod::get();
|
||||
|
||||
|
||||
@@ -151,10 +151,10 @@ pub fn generate_extrinsic(
|
||||
let signature = raw_payload.using_encoded(|e| origin.sign(e));
|
||||
|
||||
UncheckedExtrinsic::new_signed(
|
||||
function.clone(),
|
||||
function,
|
||||
origin.public().into(),
|
||||
Signature::Sr25519(signature.clone()),
|
||||
extra.clone(),
|
||||
Signature::Sr25519(signature),
|
||||
extra,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {
|
||||
sp_std::time::Duration::from_secs(6),
|
||||
).create_inherent_data().expect("Could not create the timestamp inherent data");
|
||||
|
||||
inherent_data.check_extrinsics(&block)
|
||||
inherent_data.check_extrinsics(block)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -327,10 +327,8 @@ impl SubstrateCli for RelayChainCli {
|
||||
}
|
||||
|
||||
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
|
||||
<polkadot_cli::Cli as SubstrateCli>::from_iter(
|
||||
[RelayChainCli::executable_name().to_string()].iter(),
|
||||
)
|
||||
.load_spec(id)
|
||||
<polkadot_cli::Cli as SubstrateCli>::from_iter([RelayChainCli::executable_name()].iter())
|
||||
.load_spec(id)
|
||||
}
|
||||
|
||||
fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
|
||||
|
||||
@@ -140,7 +140,7 @@ pub fn new_partial(
|
||||
);
|
||||
|
||||
let (client, backend, keystore_container, task_manager) =
|
||||
sc_service::new_full_parts::<Block, RuntimeApi, _>(&config, None, executor)?;
|
||||
sc_service::new_full_parts::<Block, RuntimeApi, _>(config, None, executor)?;
|
||||
let client = Arc::new(client);
|
||||
|
||||
let registry = config.prometheus_registry();
|
||||
@@ -158,7 +158,7 @@ pub fn new_partial(
|
||||
client.clone(),
|
||||
|_, _| async { Ok(sp_timestamp::InherentDataProvider::from_system_time()) },
|
||||
&task_manager.spawn_essential_handle(),
|
||||
registry.clone(),
|
||||
registry,
|
||||
)?;
|
||||
|
||||
let params = PartialComponents {
|
||||
@@ -200,7 +200,7 @@ async fn build_relay_chain_interface(
|
||||
relay_chain_full_node.client.clone(),
|
||||
relay_chain_full_node.backend.clone(),
|
||||
Arc::new(Mutex::new(Box::new(relay_chain_full_node.network.clone()))),
|
||||
relay_chain_full_node.overseer_handle.clone(),
|
||||
relay_chain_full_node.overseer_handle,
|
||||
)) as Arc<_>)
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ pub fn node_config(
|
||||
spec.set_storage(storage);
|
||||
|
||||
let mut network_config = NetworkConfiguration::new(
|
||||
format!("{} (parachain)", key_seed.to_string()),
|
||||
format!("{} (parachain)", key_seed),
|
||||
"network/test/0.1",
|
||||
Default::default(),
|
||||
None,
|
||||
@@ -774,10 +774,10 @@ pub fn construct_extrinsic(
|
||||
);
|
||||
let signature = raw_payload.using_encoded(|e| caller.sign(e));
|
||||
runtime::UncheckedExtrinsic::new_signed(
|
||||
function.clone(),
|
||||
function,
|
||||
caller.public().into(),
|
||||
runtime::Signature::Sr25519(signature.clone()),
|
||||
extra.clone(),
|
||||
runtime::Signature::Sr25519(signature),
|
||||
extra,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -77,9 +77,7 @@ fn main() -> Result<(), sc_cli::Error> {
|
||||
let parachain_id = ParaId::from(cli.parachain_id);
|
||||
let polkadot_cli = RelayChainCli::new(
|
||||
&config,
|
||||
[RelayChainCli::executable_name().to_string()]
|
||||
.iter()
|
||||
.chain(cli.relaychain_args.iter()),
|
||||
[RelayChainCli::executable_name()].iter().chain(cli.relaychain_args.iter()),
|
||||
);
|
||||
|
||||
let parachain_account =
|
||||
|
||||
Reference in New Issue
Block a user