mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
Expose keyring accounts in CLI (#2032)
* Expose keyring accounts in CLI So, `--alice` will give you a node with `--key //Alice --name Alice`. * Update readme
This commit is contained in:
@@ -317,7 +317,7 @@ where
|
||||
config.impl_commit = version.commit;
|
||||
config.impl_version = version.version;
|
||||
|
||||
config.name = match cli.name {
|
||||
config.name = match cli.name.or(cli.keyring.account.map(|a| a.to_string())) {
|
||||
None => generate_node_name(),
|
||||
Some(name) => name,
|
||||
};
|
||||
@@ -390,6 +390,10 @@ where
|
||||
config.keys.push("//Alice".into());
|
||||
}
|
||||
|
||||
if let Some(account) = cli.keyring.account {
|
||||
config.keys.push(format!("//{}", account));
|
||||
}
|
||||
|
||||
let rpc_interface: &str = if cli.rpc_external { "0.0.0.0" } else { "127.0.0.1" };
|
||||
let ws_interface: &str = if cli.ws_external { "0.0.0.0" } else { "127.0.0.1" };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user