mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +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
@@ -332,7 +332,7 @@ where
|
||||
let hash = header.hash();
|
||||
let parent_hash = *header.parent_hash();
|
||||
let justifications =
|
||||
if get_justification { self.client.justifications(&hash)? } else { None };
|
||||
if get_justification { self.client.justifications(hash)? } else { None };
|
||||
|
||||
let (justifications, justification, is_empty_justification) =
|
||||
if support_multiple_justifications {
|
||||
@@ -361,7 +361,7 @@ where
|
||||
};
|
||||
|
||||
let body = if get_body {
|
||||
match self.client.block_body(&hash)? {
|
||||
match self.client.block_body(hash)? {
|
||||
Some(mut extrinsics) =>
|
||||
extrinsics.iter_mut().map(|extrinsic| extrinsic.encode()).collect(),
|
||||
None => {
|
||||
@@ -374,7 +374,7 @@ where
|
||||
};
|
||||
|
||||
let indexed_body = if get_indexed_body {
|
||||
match self.client.block_indexed_body(&hash)? {
|
||||
match self.client.block_indexed_body(hash)? {
|
||||
Some(transactions) => transactions,
|
||||
None => {
|
||||
log::trace!(
|
||||
|
||||
@@ -3201,7 +3201,7 @@ mod test {
|
||||
|
||||
let finalized_block = blocks[MAX_BLOCKS_TO_LOOK_BACKWARDS as usize * 2 - 1].clone();
|
||||
let just = (*b"TEST", Vec::new());
|
||||
client.finalize_block(&finalized_block.hash(), Some(just)).unwrap();
|
||||
client.finalize_block(finalized_block.hash(), Some(just)).unwrap();
|
||||
sync.update_chain_info(&info.best_hash, info.best_number);
|
||||
|
||||
let peer_id1 = PeerId::random();
|
||||
@@ -3333,7 +3333,7 @@ mod test {
|
||||
|
||||
let finalized_block = blocks[MAX_BLOCKS_TO_LOOK_BACKWARDS as usize * 2 - 1].clone();
|
||||
let just = (*b"TEST", Vec::new());
|
||||
client.finalize_block(&finalized_block.hash(), Some(just)).unwrap();
|
||||
client.finalize_block(finalized_block.hash(), Some(just)).unwrap();
|
||||
sync.update_chain_info(&info.best_hash, info.best_number);
|
||||
|
||||
let peer_id1 = PeerId::random();
|
||||
|
||||
@@ -205,14 +205,14 @@ where
|
||||
|
||||
if !request.no_proof {
|
||||
let (proof, _count) = self.client.read_proof_collection(
|
||||
&block,
|
||||
block,
|
||||
request.start.as_slice(),
|
||||
MAX_RESPONSE_BYTES,
|
||||
)?;
|
||||
response.proof = proof.encode();
|
||||
} else {
|
||||
let entries = self.client.storage_collection(
|
||||
&block,
|
||||
block,
|
||||
request.start.as_slice(),
|
||||
MAX_RESPONSE_BYTES,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user