mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
BlockId removal: &Hash to Hash (#12626)
It changes &Block::Hash argument to Block::Hash. This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
This commit is contained in:
committed by
GitHub
parent
7c4bfc9749
commit
1ed70004e7
@@ -110,7 +110,7 @@ pub trait BlockBackend<Block: BlockT> {
|
||||
/// Get block body by ID. Returns `None` if the body is not stored.
|
||||
fn block_body(
|
||||
&self,
|
||||
hash: &Block::Hash,
|
||||
hash: Block::Hash,
|
||||
) -> sp_blockchain::Result<Option<Vec<<Block as BlockT>::Extrinsic>>>;
|
||||
|
||||
/// Get all indexed transactions for a block,
|
||||
@@ -118,8 +118,7 @@ pub trait BlockBackend<Block: BlockT> {
|
||||
///
|
||||
/// Note that this will only fetch transactions
|
||||
/// that are indexed by the runtime with `storage_index_transaction`.
|
||||
fn block_indexed_body(&self, hash: &Block::Hash)
|
||||
-> sp_blockchain::Result<Option<Vec<Vec<u8>>>>;
|
||||
fn block_indexed_body(&self, hash: Block::Hash) -> sp_blockchain::Result<Option<Vec<Vec<u8>>>>;
|
||||
|
||||
/// Get full block by id.
|
||||
fn block(&self, id: &BlockId<Block>) -> sp_blockchain::Result<Option<SignedBlock<Block>>>;
|
||||
@@ -129,7 +128,7 @@ pub trait BlockBackend<Block: BlockT> {
|
||||
-> sp_blockchain::Result<sp_consensus::BlockStatus>;
|
||||
|
||||
/// Get block justifications for the block with the given id.
|
||||
fn justifications(&self, hash: &Block::Hash) -> sp_blockchain::Result<Option<Justifications>>;
|
||||
fn justifications(&self, hash: Block::Hash) -> sp_blockchain::Result<Option<Justifications>>;
|
||||
|
||||
/// Get block hash by number.
|
||||
fn block_hash(&self, number: NumberFor<Block>) -> sp_blockchain::Result<Option<Block::Hash>>;
|
||||
@@ -138,10 +137,10 @@ pub trait BlockBackend<Block: BlockT> {
|
||||
///
|
||||
/// Note that this will only fetch transactions
|
||||
/// that are indexed by the runtime with `storage_index_transaction`.
|
||||
fn indexed_transaction(&self, hash: &Block::Hash) -> sp_blockchain::Result<Option<Vec<u8>>>;
|
||||
fn indexed_transaction(&self, hash: Block::Hash) -> sp_blockchain::Result<Option<Vec<u8>>>;
|
||||
|
||||
/// Check if transaction index exists.
|
||||
fn has_indexed_transaction(&self, hash: &Block::Hash) -> sp_blockchain::Result<bool> {
|
||||
fn has_indexed_transaction(&self, hash: Block::Hash) -> sp_blockchain::Result<bool> {
|
||||
Ok(self.indexed_transaction(hash)?.is_some())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user