Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request #153 from darrenldl/dev
Browse files Browse the repository at this point in the history
Updated default option determination code to avoid accepting custom d…
  • Loading branch information
darrenldl committed Apr 6, 2019
2 parents 4b73d5b + 518d7cf commit 52e1f35
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/cli_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,19 @@ macro_rules! get_ver_and_data_par_burst_w_defaults {
) => {{
use crate::sbx_specs::string_to_ver;
match $matches.value_of("sbx_version") {
None => (Version::V17, Some((10, 2, 10))),
None => {
if let Some(_) = $matches.value_of("rs_data") {
exit_with_msg!(usr $json_printer => "Please state the SBX version explicitly if you want to use a custom Reed-Solomon data shard count");
}
if let Some(_) = $matches.value_of("rs_parity") {
exit_with_msg!(usr $json_printer => "Please state the SBX version explicitly if you want to use a custom Reed-Solomon parity shard count");
}
if let Some(_) = $matches.value_of("burst") {
exit_with_msg!(usr $json_printer => "Please state the SBX version explicitly if you want to use a custom burst error resistance level");
}

(Version::V17, Some((10, 2, 10)))
},
Some(x) => {
let version =
match string_to_ver(&x) {
Expand Down

0 comments on commit 52e1f35

Please sign in to comment.