Skip to content
Snippets Groups Projects
Commit 5d268ba1 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

add manual sealing

parent 3d21841c
No related branches found
No related tags found
1 merge request!9add smith and membership commands
...@@ -41,11 +41,13 @@ gcli ud claim ...@@ -41,11 +41,13 @@ gcli ud claim
gcli account transfer 5000 5E4i8vcNjnrDp21Sbnp32WHm2gz8YP3GGFwmdpfg5bHd8Whb gcli account transfer 5000 5E4i8vcNjnrDp21Sbnp32WHm2gz8YP3GGFwmdpfg5bHd8Whb
``` ```
If you want to submit extrinsics without tracking progress: For testing purpose it can be useful to submit extrinsic without waiting for result and create block manually.
```sh ```sh
# only submit extrinsic to network and do not listen to result # only submit extrinsic to network and do not listen to result
gcli --no-wait account transfer 1234 5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa gcli --no-wait account transfer 1234 5FeggKqw2AbnGZF9Y9WPM2QTgzENS3Hit94Ewgmzdg5a3LNa
# create block manually (with manual sealing)
gcli blockchain create-block
``` ```
## Indexer commands ## Indexer commands
......
...@@ -18,6 +18,9 @@ pub enum Subcommand { ...@@ -18,6 +18,9 @@ pub enum Subcommand {
/// Check current block /// Check current block
#[default] #[default]
CurrentBlock, CurrentBlock,
/// Create one block manually (manual sealing)
#[clap(hide = true)]
CreateBlock,
} }
/// handle blockchain commands /// handle blockchain commands
...@@ -46,6 +49,12 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<( ...@@ -46,6 +49,12 @@ pub async fn handle_command(data: Data, command: Subcommand) -> anyhow::Result<(
.unwrap() .unwrap()
); );
} }
Subcommand::CreateBlock => {
data.client()
.rpc()
.request("engine_createBlock", subxt::rpc::rpc_params![true, true]) // create empty block and finalize
.await?; // FIXME this gives a serialization error
}
} }
Ok(()) Ok(())
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment