Skip to content

Commit

Permalink
Fix runtime amd cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
icodezjb committed Nov 22, 2021
1 parent 54f2c80 commit b127dc8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 23 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,12 @@ fn build_genesis(
verifier: BtcTxVerifier::Recover,
},
x_staking: dev::XStakingConfig {
validators,
validator_count: 50,
validator_count: 40,
sessions_per_era: 12,
glob_dist_ratio: (12, 88), // (Treasury, X-type Asset and Staking) = (12, 88)
mining_ratio: (10, 90), // (Asset Mining, Staking) = (10, 90)
minimum_penalty: 2 * DOLLARS,
minimum_penalty: 100 * DOLLARS,
candidate_requirement: (100 * DOLLARS, 1_000 * DOLLARS), // Minimum value (self_bonded, total_bonded) to be a validator candidate
..Default::default()
},
x_mining_asset: dev::XMiningAssetConfig {
Expand All @@ -427,8 +427,10 @@ fn build_genesis(
},
x_genesis_builder: dev::XGenesisBuilderConfig {
params: crate::genesis::genesis_builder_params(),
initial_authorities_endowed,
root_endowed: 0,
initial_authorities: initial_authorities
.iter()
.map(|i| (i.0).1.clone())
.collect(),
},
}
}
14 changes: 7 additions & 7 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
// Copyright 2019-2020 ChainX Project Authors. Licensed under GPL-3.0.

use sc_cli::{ChainSpec, Role, RuntimeVersion, SubstrateCli, CliConfiguration};
use std::net::SocketAddr;

use sc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Role, RuntimeVersion, SharedParams, SubstrateCli,
};
use sc_service::config::PrometheusConfig;

use chainx_service::{self as service, new_partial, IdentifyVariant};

Expand Down Expand Up @@ -85,12 +91,6 @@ impl CliConfiguration<Self> for Cli {
self.run.base.prometheus_config(default_listen_port)
}

fn telemetry_external_transport(
&self,
) -> sc_cli::Result<Option<sc_service::config::ExtTransport>> {
self.run.base.telemetry_external_transport()
}

fn default_heap_pages(&self) -> sc_cli::Result<Option<u64>> {
self.run.base.default_heap_pages()
}
Expand Down
1 change: 1 addition & 0 deletions cli/src/genesis/bitcoin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ pub fn benchmarks_trustees() -> Vec<(Chain, TrusteeInfoConfig, Vec<BtcTrusteePar
vec![(Chain::Bitcoin, btc_config, btc_trustees)]
}

#[allow(dead_code)]
pub fn mainnet_trustees() -> Vec<(Chain, TrusteeInfoConfig, Vec<BtcTrusteeParams>)> {
let btc_config = TrusteeInfoConfig {
min_trustee_count: 3,
Expand Down
12 changes: 4 additions & 8 deletions runtime/chainx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1123,14 +1123,10 @@ construct_runtime!(
// we put it at the end for keeping the extrinsic ordering.
XTransactionFee: xpallet_transaction_fee::{Pallet, Event<T>} = 35,

Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 37,

<<<<<<< HEAD
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>} = 36,
=======
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 38,
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 39,
>>>>>>> polkadot-v0.9.11
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 36,

Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 37,
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>} = 38,
}
);

Expand Down
4 changes: 1 addition & 3 deletions service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,10 @@ where

let role = config.role.clone();
let force_authoring = config.force_authoring;
<<<<<<< HEAD

// we are not interested in using any backoff from block authoring in case finality is
// lagging, in particular because we use a small session duration (50 slots) and this
// could be problematic.
=======
>>>>>>> polkadot-v0.9.11
let backoff_authoring_blocks: Option<()> = None;
let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa;
Expand Down

0 comments on commit b127dc8

Please sign in to comment.