mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
parachain-system: Send same event & digest as a standalone chain (#2064)
This ensures that upgrading a parachain code sends the same event & digest as when using `set_code` on a standalone chain. Close: https://github.com/paritytech/polkadot-sdk/issues/2049
This commit is contained in:
@@ -163,7 +163,7 @@ pub trait SetCode<T: Config> {
|
||||
|
||||
impl<T: Config> SetCode<T> for () {
|
||||
fn set_code(code: Vec<u8>) -> DispatchResult {
|
||||
<Pallet<T>>::update_code_in_storage(&code)?;
|
||||
<Pallet<T>>::update_code_in_storage(&code);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
@@ -1106,11 +1106,10 @@ impl<T: Config> Pallet<T> {
|
||||
/// Note this function almost never should be used directly. It is exposed
|
||||
/// for `OnSetCode` implementations that defer actual code being written to
|
||||
/// the storage (for instance in case of parachains).
|
||||
pub fn update_code_in_storage(code: &[u8]) -> DispatchResult {
|
||||
pub fn update_code_in_storage(code: &[u8]) {
|
||||
storage::unhashed::put_raw(well_known_keys::CODE, code);
|
||||
Self::deposit_log(generic::DigestItem::RuntimeEnvironmentUpdated);
|
||||
Self::deposit_event(Event::CodeUpdated);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Increment the reference counter on an account.
|
||||
|
||||
Reference in New Issue
Block a user