mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 06:31:09 +00:00
Make Digest support StorageAppend (#5922)
* Make `Digest` support `StorageAppend` This adds support for `StorageAppend` to `Digest`. Digest is just a wrapper around a `Vec` and we abuse the fact that SCALE does not puts any special marker into the encoding for structs. So, we can just append to the encoded Digest. A test is added that ensures, if the `Digest` format ever changes, we remove this optimization. * Update weight * Update frame/support/src/storage/mod.rs Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> * Update frame/system/src/lib.rs Co-authored-by: Alexander Popiak <alexander.popiak@parity.io> Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
@@ -18,9 +18,7 @@ use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use log::{info, trace, warn};
|
||||
use parking_lot::RwLock;
|
||||
use sc_client_api::{
|
||||
backend::{AuxStore, Backend, Finalizer, TransactionFor},
|
||||
};
|
||||
use sc_client_api::backend::{AuxStore, Backend, Finalizer, TransactionFor};
|
||||
use sp_blockchain::{HeaderBackend, Error as ClientError, well_known_cache_keys};
|
||||
use parity_scale_codec::{Encode, Decode};
|
||||
use sp_consensus::{
|
||||
@@ -220,7 +218,7 @@ impl LightAuthoritySet {
|
||||
/// Set new authorities set.
|
||||
pub fn update(&mut self, set_id: u64, authorities: AuthorityList) {
|
||||
self.set_id = set_id;
|
||||
std::mem::replace(&mut self.authorities, authorities);
|
||||
self.authorities = authorities;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user