pallet-mmr: fix offchain db for sync from zero (#12498)
* pallet-mmr: cosmetic improvements * pallet-mmr: fix offchain storage for initial sync * address review comments * pallet-mmr: change offchain fork-resistant key to `(prefix, pos, parent_hash)` Do this so that both canon and fork-resitant keys have the same `(prefix, pos).encode()` prefix. Might be useful in the future if we'd be able to to "get" offchain db entries using key prefixes as well. Signed-off-by:acatangiu <adrian@parity.io> Signed-off-by:
acatangiu <adrian@parity.io>
Showing
- substrate/frame/beefy-mmr/src/tests.rs 4 additions, 4 deletionssubstrate/frame/beefy-mmr/src/tests.rs
- substrate/frame/merkle-mountain-range/src/lib.rs 66 additions, 29 deletionssubstrate/frame/merkle-mountain-range/src/lib.rs
- substrate/frame/merkle-mountain-range/src/mmr/storage.rs 55 additions, 42 deletionssubstrate/frame/merkle-mountain-range/src/mmr/storage.rs
- substrate/frame/merkle-mountain-range/src/tests.rs 38 additions, 33 deletionssubstrate/frame/merkle-mountain-range/src/tests.rs
Please register or sign in to comment