pub trait SimnodeApiServer:
Sized
+ Send
+ Sync
+ 'static {
// Required methods
fn author_extrinsic(&self, call: Bytes, account: String) -> RpcResult<Bytes>;
fn revert_blocks(&self, n: u32) -> RpcResult<()>;
fn upgrade_signal<'life0, 'async_trait>(
&'life0 self,
go_ahead: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description
Server trait implementation for the SimnodeApi
RPC API.
Required Methods§
Constructs an extrinsic with an empty signature and the given AccountId as the Signer using simnode’s runtime api.
Sourcefn revert_blocks(&self, n: u32) -> RpcResult<()>
fn revert_blocks(&self, n: u32) -> RpcResult<()>
reverts n
number of blocks and their state from the chain.
Sourcefn upgrade_signal<'life0, 'async_trait>(
&'life0 self,
go_ahead: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upgrade_signal<'life0, 'async_trait>(
&'life0 self,
go_ahead: bool,
) -> Pin<Box<dyn Future<Output = RpcResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert the [UpgradeGoAhead
] command into the inherents as if it came from the relay chain.
This greenlights/aborts a pending runtime upgrade.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.