mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 18:57:57 +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
|
||||
}
|
||||
|
||||
/// 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
|
||||
pub async fn chain_get_header(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user