mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-24 03:05:44 +00:00
chainHead: Remove chainHead_genesis method (#2296)
The method has been removed from the spec (https://github.com/paritytech/json-rpc-interface-spec/tree/main/src), this PR keeps the `chainHead` in sync with that change. @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -107,8 +107,6 @@ pub struct ChainHead<BE: Backend<Block>, Block: BlockT, Client> {
|
||||
executor: SubscriptionTaskExecutor,
|
||||
/// Keep track of the pinned blocks for each subscription.
|
||||
subscriptions: Arc<SubscriptionManagement<Block, BE>>,
|
||||
/// The hexadecimal encoded hash of the genesis block.
|
||||
genesis_hash: String,
|
||||
/// The maximum number of items reported by the `chainHead_storage` before
|
||||
/// pagination is required.
|
||||
operation_max_storage_items: usize,
|
||||
@@ -118,14 +116,12 @@ pub struct ChainHead<BE: Backend<Block>, Block: BlockT, Client> {
|
||||
|
||||
impl<BE: Backend<Block>, Block: BlockT, Client> ChainHead<BE, Block, Client> {
|
||||
/// Create a new [`ChainHead`].
|
||||
pub fn new<GenesisHash: AsRef<[u8]>>(
|
||||
pub fn new(
|
||||
client: Arc<Client>,
|
||||
backend: Arc<BE>,
|
||||
executor: SubscriptionTaskExecutor,
|
||||
genesis_hash: GenesisHash,
|
||||
config: ChainHeadConfig,
|
||||
) -> Self {
|
||||
let genesis_hash = hex_string(&genesis_hash.as_ref());
|
||||
Self {
|
||||
client,
|
||||
backend: backend.clone(),
|
||||
@@ -137,7 +133,6 @@ impl<BE: Backend<Block>, Block: BlockT, Client> ChainHead<BE, Block, Client> {
|
||||
backend,
|
||||
)),
|
||||
operation_max_storage_items: config.operation_max_storage_items,
|
||||
genesis_hash,
|
||||
_phantom: PhantomData,
|
||||
}
|
||||
}
|
||||
@@ -315,10 +310,6 @@ where
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
fn chain_head_unstable_genesis_hash(&self) -> RpcResult<String> {
|
||||
Ok(self.genesis_hash.clone())
|
||||
}
|
||||
|
||||
fn chain_head_unstable_storage(
|
||||
&self,
|
||||
follow_subscription: String,
|
||||
|
||||
Reference in New Issue
Block a user