-
Notifications
You must be signed in to change notification settings - Fork 1.6k
BlockId removal: refactor: StorageProvider #6160
Conversation
It changes the arguments of `Backend::StorageProvider` trait from: block: `BlockId<Block>` to: hash: `&Block::Hash`
fn storage( | ||
&self, | ||
id: &BlockId<Block>, | ||
hash: &<Block as BlockT>::Hash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hash: &<Block as BlockT>::Hash, | |
hash: &Block::Hash, |
You don't need to fully qualify the trait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't compile:
--> node/client/src/lib.rs:427:10
|
427 | hash: &Block::Hash,
| ^^^^^^^^^^^ help: use fully-qualified syntax: `<sp_runtime::generic::Block<sp_runtime::generic::Header<u32, BlakeTwo256>, OpaqueExtrinsic> as Trait>::Hash`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah, I thought Block
is a generic type here. However, it is the actual type. So, this doesn't work. Sorry!
fn storage( | ||
&self, | ||
id: &BlockId<Block>, | ||
hash: &<Block as BlockT>::Hash, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yeah, I thought Block
is a generic type here. However, it is the actual type. So, this doesn't work. Sorry!
Co-authored-by: Bastian Köcher <info@kchr.de>
Waiting for commit status. |
* master: (21 commits) try and fix build (#6170) Companion for EPM duplicate submissions (#6115) Bump docker/setup-buildx-action from 2.0.0 to 2.1.0 (#6141) companion for #12212 (#6162) Bump substrate (#6164) BlockId removal: refactor: StorageProvider (#6160) availability-recovery: use `IfDisconnected::TryConnect` for chunks (#6081) Update clap to version 4 (#6128) Add `force_open_hrmp_channel` Call (#6155) Fix fuzzing builds xcm-fuzz and erasure-coding fuzzer (#6153) BlockId removal refactor: Backend::state_at (#6149) First round of implementers guide fixes (#6146) bump zombienet version (#6142) lingua.dic is not managed by CI team (#6148) pallet-mmr: RPC and Runtime APIs work with block numbers (#6072) Separate preparation timeouts for PVF prechecking and execution (#6139) Malus: add disputed block percentage (#6100) refactor grid topology to expose more info to subsystems (#6140) Manual Para Lock (#5451) Expose node subcommands in Malus CLI (#6135) ...
It changes the arguments of
Backend::StorageProvider
trait from:block:
BlockId<Block>
to: hash:&Block::Hash
Companion for: paritytech/substrate#12510
cumulus companion: paritytech/cumulus#1770