mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 20:21:06 +00:00
Implement legacy RPC system_account_next_index (#1250)
RPC system_account_next_index compensates for extrinsics in transaction pool as opposed to get_account_nonce which does not.
This commit is contained in:
committed by
GitHub
parent
633219648d
commit
b8b56cb9c4
@@ -138,6 +138,18 @@ impl<T: Config> LegacyRpcMethods<T> {
|
|||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Fetch next nonce for an Account
|
||||||
|
///
|
||||||
|
/// Return account nonce adjusted for extrinsics currently in transaction pool
|
||||||
|
pub async fn system_account_next_index(&self, account_id: &T::AccountId) -> Result<u64, Error>
|
||||||
|
where
|
||||||
|
T::AccountId: Serialize,
|
||||||
|
{
|
||||||
|
self.client
|
||||||
|
.request("system_accountNextIndex", rpc_params![&account_id])
|
||||||
|
.await
|
||||||
|
}
|
||||||
|
|
||||||
/// Get a header
|
/// Get a header
|
||||||
pub async fn chain_get_header(
|
pub async fn chain_get_header(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
Reference in New Issue
Block a user