Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gguoss authored Feb 20, 2019
1 parent 1038f5a commit 206f172
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
Binary file added cli/src/chainx_runtime_wasm.compact.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions cli/src/genesis_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ pub fn testnet_genesis(genesis_spec: GenesisSpec) -> GenesisConfig {
GenesisConfig {
consensus: Some(ConsensusConfig {
code: include_bytes!(
"../../runtime/wasm/target/wasm32-unknown-unknown/release/chainx_runtime_wasm.compact.wasm"
"./chainx_runtime_wasm.compact.wasm"
).to_vec(),
authorities: initial_authorities.clone(),
}),
Expand Down Expand Up @@ -218,7 +218,7 @@ pub fn testnet_genesis(genesis_spec: GenesisSpec) -> GenesisConfig {
bonding_duration: 150 * 12, // 150 blocks per bonding
intention_bonding_duration: 150 * 12 * 10,
current_era: 0,
penalty: 0,
penalty: 50 * 100_000_000 / 150, // 1 per block reward
funding: Default::default(),
intentions: full_endowed.clone().into_iter().map(|(who, value, name, url, _, _)| (who.into(), value, name, url)).collect(),
validator_stake_threshold: 1,
Expand Down
18 changes: 7 additions & 11 deletions runtime/src/fee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ impl CheckFee for Call {
let base_power = match self {
// xassets
Call::XAssets(call) => match call {
XAssetsCall::transfer(_, _, _, _) => Some(10),
// root
XAssetsCall::set_balance(_, _, _) => Some(0),
XAssetsCall::register_asset(_, _, _) => Some(0),
XAssetsCall::revoke_asset(_) => Some(0),
XAssetsCall::transfer(_, _, _, _) => Some(1),
_ => None,
},
Call::XAssetsProcess(call) => match call {
Expand All @@ -46,10 +42,10 @@ impl CheckFee for Call {
None
} else {
match call {
BitcoinCall::push_header(_) => Some(20),
BitcoinCall::push_transaction(_) => Some(10),
BitcoinCall::create_withdraw_tx(_, _) => Some(50),
BitcoinCall::sign_withdraw_tx(_, _) => Some(50),
BitcoinCall::push_header(_) => Some(10),
BitcoinCall::push_transaction(_) => Some(8),
BitcoinCall::create_withdraw_tx(_, _) => Some(5),
BitcoinCall::sign_withdraw_tx(_, _) => Some(5),
_ => None,
}
};
Expand All @@ -58,7 +54,7 @@ impl CheckFee for Call {
// xmining
Call::XStaking(call) => match call {
XStakingCall::register(_) => Some(100),
XStakingCall::refresh(_, _, _, _) => Some(5),
XStakingCall::refresh(_, _, _, _) => Some(100),
XStakingCall::nominate(_, _, _) => Some(5),
XStakingCall::unnominate(_, _, _) => Some(3),
XStakingCall::unfreeze(_, _) => Some(2),
Expand Down Expand Up @@ -92,7 +88,7 @@ impl CheckFee for Call {
None
} else {
match call {
SdotCall::claim(_, _, _) => Some(10),
SdotCall::claim(_, _, _) => Some(2),
_ => None,
}
};
Expand Down
Binary file not shown.
4 changes: 2 additions & 2 deletions xrml/xdex/spot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ impl<T: Trait> Module<T> {
Ok(())
}
fn do_match(order: &mut OrderT<T>, pair: &OrderPair, handicap: &HandicapT<T>) {
let (mut opponent_direction,mut opponent_price) = match order.direction {
let (opponent_direction,mut opponent_price) = match order.direction {
OrderDirection::Buy => (OrderDirection::Sell,handicap.sell),
OrderDirection::Sell => (OrderDirection::Buy,handicap.buy),
};
Expand Down Expand Up @@ -1120,7 +1120,7 @@ impl<T: Trait> Module<T> {
Some((first, _, _)) => match <xassets::Module<T>>::asset_info(&pair.second) {
Some((second, _, _)) => {
let trans_amount = match ((amount.as_() as u128) * (price.as_() as u128))
.checked_mul((10_u128.pow(second.precision().as_())))
.checked_mul(10_u128.pow(second.precision().as_()))
{
Some(x) => T::Balance::sa(
(x / (10_u128.pow(first.precision().as_())
Expand Down

0 comments on commit 206f172

Please sign in to comment.