mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
removes use of sc_client::Client from node-transaction-factory (#5158)
* removes use of sc_client::Client from node-transaction-factory * move sc-block-builder to [dev-dependencies] in substrate-test-runtime
This commit is contained in:
@@ -544,28 +544,6 @@ impl<B, E, Block, RA> Client<B, E, Block, RA> where
|
||||
Ok((storage, configs))
|
||||
}
|
||||
|
||||
/// Create a new block, built on the head of the chain.
|
||||
pub fn new_block(
|
||||
&self,
|
||||
inherent_digests: DigestFor<Block>,
|
||||
) -> sp_blockchain::Result<sc_block_builder::BlockBuilder<Block, Self, B>> where
|
||||
E: Clone + Send + Sync,
|
||||
RA: Send + Sync,
|
||||
Self: ProvideRuntimeApi<Block>,
|
||||
<Self as ProvideRuntimeApi<Block>>::Api: BlockBuilderApi<Block, Error = Error> +
|
||||
ApiExt<Block, StateBackend = backend::StateBackendFor<B, Block>>
|
||||
{
|
||||
let info = self.chain_info();
|
||||
sc_block_builder::BlockBuilder::new(
|
||||
self,
|
||||
info.best_hash,
|
||||
info.best_number,
|
||||
RecordProof::No,
|
||||
inherent_digests,
|
||||
&self.backend,
|
||||
)
|
||||
}
|
||||
|
||||
/// Apply a checked and validated block to an operation. If a justification is provided
|
||||
/// then `finalized` *must* be true.
|
||||
fn apply_block(
|
||||
@@ -1201,6 +1179,21 @@ impl<B, E, Block, RA> BlockBuilderProvider<B, Block, Self> for Client<B, E, Bloc
|
||||
&self.backend
|
||||
)
|
||||
}
|
||||
|
||||
fn new_block(
|
||||
&self,
|
||||
inherent_digests: DigestFor<Block>,
|
||||
) -> sp_blockchain::Result<sc_block_builder::BlockBuilder<Block, Self, B>> {
|
||||
let info = self.chain_info();
|
||||
sc_block_builder::BlockBuilder::new(
|
||||
self,
|
||||
info.best_hash,
|
||||
info.best_number,
|
||||
RecordProof::No,
|
||||
inherent_digests,
|
||||
&self.backend,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
impl<B, E, Block, RA> ExecutorProvider<Block> for Client<B, E, Block, RA> where
|
||||
|
||||
Reference in New Issue
Block a user