mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 09:51:02 +00:00
paras: count upgrade delay from inclusion (#7486)
* paras: count upgrade delay from inclusion * fix warning * rename check cause block number field * rename inclusion_parent -> included_at
This commit is contained in:
@@ -884,10 +884,13 @@ impl<T: Config> Pallet<T> {
|
||||
// initial weight is config read.
|
||||
let mut weight = T::DbWeight::get().reads_writes(1, 0);
|
||||
if let Some(new_code) = commitments.new_validation_code {
|
||||
// Block number of candidate's inclusion.
|
||||
let now = <frame_system::Pallet<T>>::block_number();
|
||||
|
||||
weight.saturating_add(<paras::Pallet<T>>::schedule_code_upgrade(
|
||||
receipt.descriptor.para_id,
|
||||
new_code,
|
||||
relay_parent_number,
|
||||
now,
|
||||
&config,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user