Speed up setting lockups (#9849)
* De-dup sending messages * Add --no-wait option for setting lockups * Don't set lockups that are already set * Extend adjacent lockups
This commit is contained in:
@ -244,7 +244,19 @@ where
|
||||
.arg(lockup_epoch_arg())
|
||||
.arg(lockup_date_arg())
|
||||
.arg(new_custodian_arg())
|
||||
.arg(num_accounts_arg()),
|
||||
.arg(num_accounts_arg())
|
||||
.arg(
|
||||
Arg::with_name("no_wait")
|
||||
.long("no-wait")
|
||||
.help("Send transactions without waiting for confirmation"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("unlock_years")
|
||||
.long("unlock-years")
|
||||
.takes_value(true)
|
||||
.value_name("NUMBER")
|
||||
.help("Years to unlock after the cliff"),
|
||||
),
|
||||
)
|
||||
.subcommand(
|
||||
SubCommand::with_name("rebase")
|
||||
@ -316,6 +328,8 @@ fn parse_set_lockup_args(matches: &ArgMatches<'_>) -> SetLockupArgs<String, Stri
|
||||
lockup_date: unix_timestamp_from_rfc3339_datetime(matches, "lockup_date"),
|
||||
new_custodian: value_t!(matches, "new_custodian", String).ok(),
|
||||
num_accounts: value_t_or_exit!(matches, "num_accounts", usize),
|
||||
no_wait: matches.is_present("no_wait"),
|
||||
unlock_years: value_t!(matches, "unlock_years", f64).ok(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user