Skip to content

Commit d8bae7b

Browse files
github-actions[bot]snowmead
authored andcommitted
Update from github-actions[bot] running command 'prdoc --audience runtime_dev --bump patch'
1 parent c8679e6 commit d8bae7b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

prdoc/pr_11028.prdoc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
title: Add `DecodeWithMemTracking` derive to `CompactProof`
2+
doc:
3+
- audience: Runtime Dev
4+
description: |-
5+
# Description
6+
7+
Add `DecodeWithMemTracking` derive to `CompactProof` in `substrate/primitives/trie/src/storage_proof.rs`.
8+
9+
`StorageProof` already derived `DecodeWithMemTracking` but `CompactProof` in the same file was missed.
10+
11+
## Integration
12+
13+
No integration changes required for downstream projects. `CompactProof` now implements `DecodeWithMemTracking`, which is a strictly additive trait implementation. Existing code using `CompactProof` will continue to work as before.
14+
15+
## Review Notes
16+
17+
Single-line change adding `DecodeWithMemTracking` to the derive macro list on `CompactProof`:
18+
19+
```diff
20+
-#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, TypeInfo)]
21+
+#[derive(Debug, PartialEq, Eq, Clone, Encode, Decode, DecodeWithMemTracking, TypeInfo)]
22+
pub struct CompactProof {
23+
pub encoded_nodes: Vec<Vec<u8>>,
24+
}
25+
```
26+
27+
`CompactProof` only contains `Vec<Vec<u8>>`, which already implements `DecodeWithMemTracking`, so the derive works without any manual implementation.
28+
crates:
29+
- name: sp-trie
30+
bump: patch

0 commit comments

Comments
 (0)