mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
BlockId removal: refactor: Backend::block_indexed_body (#12609)
* BlockId removal: refactor: Backend::block_indexed_body It changes the arguments of `Backend::block_indexed_body` method from: `BlockId<Block>` to: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292) * trigger CI job
This commit is contained in:
committed by
GitHub
parent
153399431b
commit
11b6409c12
@@ -694,8 +694,13 @@ impl<Block: BlockT> sc_client_api::blockchain::Backend<Block> for BlockchainDb<B
|
||||
Ok(self.db.contains(columns::TRANSACTION, hash.as_ref()))
|
||||
}
|
||||
|
||||
fn block_indexed_body(&self, id: BlockId<Block>) -> ClientResult<Option<Vec<Vec<u8>>>> {
|
||||
let body = match read_db(&*self.db, columns::KEY_LOOKUP, columns::BODY_INDEX, id)? {
|
||||
fn block_indexed_body(&self, hash: &Block::Hash) -> ClientResult<Option<Vec<Vec<u8>>>> {
|
||||
let body = match read_db(
|
||||
&*self.db,
|
||||
columns::KEY_LOOKUP,
|
||||
columns::BODY_INDEX,
|
||||
BlockId::<Block>::Hash(*hash),
|
||||
)? {
|
||||
Some(body) => body,
|
||||
None => return Ok(None),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user