mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 01:11:10 +00:00
BlockId removal: refactor: Backend::begin_state_operation (#12541)
It changes the arguments of `Backend::begin_state_operation` from: block: `BlockId<Block>` to: hash: `&Block::Hash` This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
This commit is contained in:
committed by
GitHub
parent
bf57a2e92d
commit
c0e8abe1a8
@@ -467,7 +467,7 @@ pub trait Backend<Block: BlockT>: AuxStore + Send + Sync {
|
||||
fn begin_state_operation(
|
||||
&self,
|
||||
operation: &mut Self::BlockImportOperation,
|
||||
block: BlockId<Block>,
|
||||
block: &Block::Hash,
|
||||
) -> sp_blockchain::Result<()>;
|
||||
|
||||
/// Commit block insertion.
|
||||
|
||||
@@ -695,10 +695,9 @@ where
|
||||
fn begin_state_operation(
|
||||
&self,
|
||||
operation: &mut Self::BlockImportOperation,
|
||||
block: BlockId<Block>,
|
||||
block: &Block::Hash,
|
||||
) -> sp_blockchain::Result<()> {
|
||||
let hash = self.blockchain.expect_block_hash_from_id(&block)?;
|
||||
operation.old_state = self.state_at(&hash)?;
|
||||
operation.old_state = self.state_at(block)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user