Skip to content

Commit

Permalink
1.Modify move dependencies 2.In ondemand mode, only the information o…
Browse files Browse the repository at this point in the history
…f your own chain is displayed
  • Loading branch information
sulijia committed Sep 13, 2024
1 parent 6efd0f7 commit 4386a62
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

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

13 changes: 6 additions & 7 deletions client/coretime/bulk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,12 @@ 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
10 changes: 5 additions & 5 deletions client/coretime/on-demand/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,13 +493,13 @@ pub async fn ondemand_event_task(
let ev_order_placed = event.as_event::<metadata::OnDemandOrderPlacedV0>();
if let Ok(order_placed_event) = ev_order_placed {
if let Some(ev) = order_placed_event {
log::info!(
"=====================Find OnDemandOrderPlaced event:{:?},{:?}================",
ev.para_id,
ev.spot_price,
);
let exp_id: u32 = para_id.into();
if ev.para_id.0 == exp_id {
log::info!(
"=====================Find OnDemandOrderPlaced event:{:?},{:?}================",
ev.para_id,
ev.spot_price,
);
// The orderer gets it from the slot by default.
let mut order_record_local = order_record.lock().await;
order_record_local.price = ev.spot_price;
Expand Down
3 changes: 1 addition & 2 deletions pallets/liquidation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,8 +673,7 @@ 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
3 changes: 1 addition & 2 deletions runtime/src/xcms/xcm_weight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,7 @@ 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

0 comments on commit 4386a62

Please sign in to comment.