mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Default not implemented for non-std builds for PersistedValidationData (#1207)
* Default not implemented for non-std builds for PersistedValidationData * Remove v1 * Remove v1 for v2, this time correct * More reverts of v1 for v2 * Update pallets/parachain-system/src/lib.rs * fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -1049,7 +1049,14 @@ impl<T: Config> BlockNumberProvider for RelaychainBlockNumberProvider<T> {
|
||||
}
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
fn set_block_number(block: Self::BlockNumber) {
|
||||
let mut validation_data = Pallet::<T>::validation_data().unwrap_or_default();
|
||||
let mut validation_data = Pallet::<T>::validation_data().unwrap_or_else(||
|
||||
// PersistedValidationData does not impl default in non-std
|
||||
PersistedValidationData {
|
||||
parent_head: vec![].into(),
|
||||
relay_parent_number: Default::default(),
|
||||
max_pov_size: Default::default(),
|
||||
relay_parent_storage_root: Default::default(),
|
||||
});
|
||||
validation_data.relay_parent_number = block;
|
||||
ValidationData::<T>::put(validation_data)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user