mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-12-03 20:33:59 +01:00
Add TTL Option to command line (#273)
* re-insert v2 slate * reinstate version conversions * rustfmt * add and test versioning checks against 2.0.0 wallets * rustfmt * fix to invoice file output * doctest fix * remove target slate version from command line options * add ttl option to send_tx and pay commands * rustfmt
This commit is contained in:
@@ -155,6 +155,11 @@ subcommands:
|
||||
short: t
|
||||
long: stored_tx
|
||||
takes_value: true
|
||||
- ttl_blocks:
|
||||
help: If present, the number of blocks from the current after which wallets should refuse to process transactions further
|
||||
short: b
|
||||
long: ttl_blocks
|
||||
takes_value: true
|
||||
- receive:
|
||||
about: Processes a transaction file to accept a transfer from a sender
|
||||
args:
|
||||
@@ -252,6 +257,11 @@ subcommands:
|
||||
short: i
|
||||
long: input
|
||||
takes_value: true
|
||||
- ttl_blocks:
|
||||
help: If present, the number of blocks from the current after which wallets should refuse to process transactions further
|
||||
short: b
|
||||
long: ttl_blocks
|
||||
takes_value: true
|
||||
- outputs:
|
||||
about: Raw wallet output info (list of outputs)
|
||||
- txs:
|
||||
|
||||
@@ -453,6 +453,9 @@ pub fn parse_send_args(args: &ArgMatches) -> Result<command::SendArgs, ParseErro
|
||||
// fluff
|
||||
let fluff = args.is_present("fluff");
|
||||
|
||||
// ttl_blocks
|
||||
let ttl_blocks = parse_u64_or_none(args.value_of("ttl_blocks"));
|
||||
|
||||
// max_outputs
|
||||
let max_outputs = 500;
|
||||
|
||||
@@ -493,6 +496,7 @@ pub fn parse_send_args(args: &ArgMatches) -> Result<command::SendArgs, ParseErro
|
||||
fluff: fluff,
|
||||
max_outputs: max_outputs,
|
||||
payment_proof_address,
|
||||
ttl_blocks,
|
||||
target_slate_version: target_slate_version,
|
||||
})
|
||||
}
|
||||
@@ -636,6 +640,9 @@ pub fn parse_process_invoice_args(
|
||||
return Err(ParseError::ArgumentError(msg));
|
||||
}
|
||||
|
||||
// ttl_blocks
|
||||
let ttl_blocks = parse_u64_or_none(args.value_of("ttl_blocks"));
|
||||
|
||||
// max_outputs
|
||||
let max_outputs = 500;
|
||||
|
||||
@@ -663,6 +670,7 @@ pub fn parse_process_invoice_args(
|
||||
dest: dest.to_owned(),
|
||||
max_outputs: max_outputs,
|
||||
input: tx_file.to_owned(),
|
||||
ttl_blocks,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user