Skip to content

Commit

Permalink
Merge pull request exonum#258 from vldm/test_net_0_nodes
Browse files Browse the repository at this point in the history
Dissalow generate-testnet with 0 nodes.
  • Loading branch information
defuz committed Jul 20, 2017
2 parents c7b20c7 + f99d40c commit 491fb6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions exonum/src/helpers/fabric/details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,10 @@ impl Command for GenerateTestnet {
DEFAULT_EXONUM_LISTEN_PORT,
);

if count == 0 {
panic!("Can't generate testnet with zero nodes count.");
}

let dir = Path::new(&dir);
let dir = dir.join("validators");
if !dir.exists() {
Expand Down

0 comments on commit 491fb6f

Please sign in to comment.