Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions client/coretime/bulk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,13 @@ where
let constant_query =
subxt::dynamic::constant("Broker", "TimeslicePeriod");

let time_slice =
api.constants()
.at(&constant_query)?
.to_value()?
.as_u128()
.expect("coretime parachain time slice none") as u32;
let time_slice = api
.constants()
.at(&constant_query)?
.to_value()?
.as_u128()
.expect("coretime parachain time slice none")
as u32;

item.end_relaychain_height =
ev.when + item.duration * time_slice;
Expand Down
8 changes: 6 additions & 2 deletions pallets/liquidation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ pub mod pallet {

let (collator, real_gas_cost) = match T::OrderGasCost::gas_cost(n) {
Ok(cost) => match cost {
Some((collator, real_gas_cost)) => (collator, real_gas_cost),
Some((collator, real_gas_cost)) => {
let adjusted_gas_cost = real_gas_cost * PARACHAIN_TO_RELAYCHAIN_UNIT;
(collator, adjusted_gas_cost)
},
None => return,
},
Err(_) => {
Expand Down Expand Up @@ -670,7 +673,8 @@ pub mod pallet {
let total_existing_operation_ratio: u32 =
OperationRatios::<T>::iter().map(|(_, r)| r).sum();
let total_ratio = system_ratio
+ treasury_ratio + collator_ratio
+ treasury_ratio
+ collator_ratio
+ total_existing_operation_ratio
+ ratio;
log::info!("3 -+-+-+-+-+ set operation ratio, total ratio:{:?}, system_ratio:{:?}, treasury_ratio:{:?}, collator_ratio:{:?}, operation account:{:?}, op_ratio:{:?}",
Expand Down
1 change: 1 addition & 0 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1418,6 +1418,7 @@ impl_runtime_apis! {

fn account_basic(address: H160) -> EVMAccount {
let account_id = <Runtime as pallet_evm::Config>::AddressMapping::into_account_id(address);

let nonce = frame_system::Pallet::<Runtime>::account_nonce(&account_id);
let balance_free =
<Runtime as pallet_evm::Config>::Currency::free_balance(account_id.clone());
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/xcms/xcm_weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ impl<
AccountId,
Currency: CurrencyT<AccountId>,
OnUnbalanced: OnUnbalancedT<Currency::NegativeImbalance>,
> WeightTrader for UsingComponentsEx<WeightToFee, AssetIdValue, AccountId, Currency, OnUnbalanced>
> WeightTrader
for UsingComponentsEx<WeightToFee, AssetIdValue, AccountId, Currency, OnUnbalanced>
{
fn new() -> Self {
Self(Weight::zero(), Zero::zero(), PhantomData)
Expand Down