mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 04:01:02 +00:00
Add default for some options. (#763)
This commit is contained in:
committed by
Bastian Köcher
parent
c3d651d29a
commit
19f021e34c
@@ -93,8 +93,8 @@ pub enum RelayMessages {
|
|||||||
rialto_sign: RialtoSigningParams,
|
rialto_sign: RialtoSigningParams,
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
prometheus_params: PrometheusParams,
|
prometheus_params: PrometheusParams,
|
||||||
/// Hex-encoded id of lane that should be served by relay.
|
/// Hex-encoded lane id that should be served by the relay. Defaults to `00000000`.
|
||||||
#[structopt(long)]
|
#[structopt(long, default_value = "00000000")]
|
||||||
lane: HexLaneId,
|
lane: HexLaneId,
|
||||||
},
|
},
|
||||||
/// Serve given lane of Rialto -> Millau messages.
|
/// Serve given lane of Rialto -> Millau messages.
|
||||||
@@ -109,8 +109,8 @@ pub enum RelayMessages {
|
|||||||
millau_sign: MillauSigningParams,
|
millau_sign: MillauSigningParams,
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
prometheus_params: PrometheusParams,
|
prometheus_params: PrometheusParams,
|
||||||
/// Hex-encoded id of lane that should be served by relay.
|
/// Hex-encoded lane id that should be served by the relay. Defaults to `00000000`.
|
||||||
#[structopt(long)]
|
#[structopt(long, default_value = "00000000")]
|
||||||
lane: HexLaneId,
|
lane: HexLaneId,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -151,8 +151,8 @@ pub enum SendMessage {
|
|||||||
millau_sign: MillauSigningParams,
|
millau_sign: MillauSigningParams,
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
rialto_sign: RialtoSigningParams,
|
rialto_sign: RialtoSigningParams,
|
||||||
/// Hex-encoded lane id.
|
/// Hex-encoded lane id. Defaults to `00000000`.
|
||||||
#[structopt(long)]
|
#[structopt(long, default_value = "00000000")]
|
||||||
lane: HexLaneId,
|
lane: HexLaneId,
|
||||||
/// Dispatch weight of the message. If not passed, determined automatically.
|
/// Dispatch weight of the message. If not passed, determined automatically.
|
||||||
#[structopt(long)]
|
#[structopt(long)]
|
||||||
@@ -163,8 +163,9 @@ pub enum SendMessage {
|
|||||||
/// Message type.
|
/// Message type.
|
||||||
#[structopt(subcommand)]
|
#[structopt(subcommand)]
|
||||||
message: ToRialtoMessage,
|
message: ToRialtoMessage,
|
||||||
/// The origin to use when dispatching the message on the target chain.
|
/// The origin to use when dispatching the message on the target chain. Defaults to
|
||||||
#[structopt(long, possible_values = &Origins::variants())]
|
/// `SourceAccount`.
|
||||||
|
#[structopt(long, possible_values = &Origins::variants(), default_value = "Source")]
|
||||||
origin: Origins,
|
origin: Origins,
|
||||||
},
|
},
|
||||||
/// Submit message to given Rialto -> Millau lane.
|
/// Submit message to given Rialto -> Millau lane.
|
||||||
@@ -175,8 +176,8 @@ pub enum SendMessage {
|
|||||||
rialto_sign: RialtoSigningParams,
|
rialto_sign: RialtoSigningParams,
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
millau_sign: MillauSigningParams,
|
millau_sign: MillauSigningParams,
|
||||||
/// Hex-encoded lane id.
|
/// Hex-encoded lane id. Defaults to `00000000`.
|
||||||
#[structopt(long)]
|
#[structopt(long, default_value = "00000000")]
|
||||||
lane: HexLaneId,
|
lane: HexLaneId,
|
||||||
/// Dispatch weight of the message. If not passed, determined automatically.
|
/// Dispatch weight of the message. If not passed, determined automatically.
|
||||||
#[structopt(long)]
|
#[structopt(long)]
|
||||||
@@ -187,8 +188,9 @@ pub enum SendMessage {
|
|||||||
/// Message type.
|
/// Message type.
|
||||||
#[structopt(subcommand)]
|
#[structopt(subcommand)]
|
||||||
message: ToMillauMessage,
|
message: ToMillauMessage,
|
||||||
/// The origin to use when dispatching the message on the target chain.
|
/// The origin to use when dispatching the message on the target chain. Defaults to
|
||||||
#[structopt(long, possible_values = &Origins::variants())]
|
/// `SourceAccount`.
|
||||||
|
#[structopt(long, possible_values = &Origins::variants(), default_value = "Source")]
|
||||||
origin: Origins,
|
origin: Origins,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -321,7 +323,7 @@ macro_rules! declare_chain_options {
|
|||||||
#[derive(StructOpt)]
|
#[derive(StructOpt)]
|
||||||
pub struct [<$chain ConnectionParams>] {
|
pub struct [<$chain ConnectionParams>] {
|
||||||
#[doc = "Connect to " $chain " node at given host."]
|
#[doc = "Connect to " $chain " node at given host."]
|
||||||
#[structopt(long)]
|
#[structopt(long, default_value = "127.0.0.1")]
|
||||||
pub [<$chain_prefix _host>]: String,
|
pub [<$chain_prefix _host>]: String,
|
||||||
#[doc = "Connect to " $chain " node websocket server at given port."]
|
#[doc = "Connect to " $chain " node websocket server at given port."]
|
||||||
#[structopt(long)]
|
#[structopt(long)]
|
||||||
|
|||||||
Reference in New Issue
Block a user