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>
Showing
- substrate/client/finality-grandpa/src/light_import.rs 2 additions, 4 deletionssubstrate/client/finality-grandpa/src/light_import.rs
- substrate/frame/support/src/storage/mod.rs 46 additions, 1 deletionsubstrate/frame/support/src/storage/mod.rs
- substrate/frame/system/src/lib.rs 3 additions, 5 deletionssubstrate/frame/system/src/lib.rs
- substrate/primitives/runtime/src/generic/digest.rs 7 additions, 3 deletionssubstrate/primitives/runtime/src/generic/digest.rs
Please register or sign in to comment