mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 06:31:03 +00:00
Make sure when storage is empty we set the block number (#1197)
This commit is contained in:
@@ -1049,9 +1049,8 @@ impl<T: Config> BlockNumberProvider for RelaychainBlockNumberProvider<T> {
|
|||||||
}
|
}
|
||||||
#[cfg(feature = "runtime-benchmarks")]
|
#[cfg(feature = "runtime-benchmarks")]
|
||||||
fn set_block_number(block: Self::BlockNumber) {
|
fn set_block_number(block: Self::BlockNumber) {
|
||||||
if let Some(mut validation_data) = Pallet::<T>::validation_data() {
|
let mut validation_data = Pallet::<T>::validation_data().unwrap_or_default();
|
||||||
validation_data.relay_parent_number = block;
|
validation_data.relay_parent_number = block;
|
||||||
ValidationData::<T>::put(validation_data)
|
ValidationData::<T>::put(validation_data)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user