Improve overall performance (#6699)

* Improve overall performance

* Clean up code

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove needless ::

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Remove needless ::

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
This commit is contained in:
pscott
2020-07-21 14:46:49 +02:00
committed by GitHub
parent ab82eb1c98
commit 046fda914a
73 changed files with 141 additions and 144 deletions
@@ -156,7 +156,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
// if the node isn't actively participating in consensus then it doesn't
// need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() {
Some(keystore.clone() as sp_core::traits::BareCryptoStorePtr)
Some(keystore as sp_core::traits::BareCryptoStorePtr)
} else {
None
};
@@ -182,11 +182,11 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
let grandpa_config = sc_finality_grandpa::GrandpaParams {
config: grandpa_config,
link: grandpa_link,
network: network.clone(),
inherent_data_providers: inherent_data_providers.clone(),
network,
inherent_data_providers,
telemetry_on_connect: Some(telemetry_on_connect_sinks.on_connect_stream()),
voting_rule: sc_finality_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry: prometheus_registry.clone(),
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
};
@@ -200,7 +200,7 @@ pub fn new_full(config: Configuration) -> Result<TaskManager, ServiceError> {
sc_finality_grandpa::setup_disabled_grandpa(
client,
&inherent_data_providers,
network.clone(),
network,
)?;
}
@@ -221,7 +221,7 @@ pub fn new_light(config: Configuration) -> Result<TaskManager, ServiceError> {
let pool_api = sc_transaction_pool::LightChainApi::new(
builder.client().clone(),
fetcher.clone(),
fetcher,
);
let pool = Arc::new(sc_transaction_pool::BasicPool::new_light(
builder.config().transaction_pool.clone(),