Skip to content

Commit

Permalink
Use PAR2 constants in getCreateFlags
Browse files Browse the repository at this point in the history
Feature-End: create-api
  • Loading branch information
akalin committed May 17, 2021
1 parent d4eab3b commit 6f9c2db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/par/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,9 @@ func getCreateFlags(name string) (*flag.FlagSet, *createFlags) {
flagSet := newFlagSet(name + " create")

var flags createFlags
flagSet.IntVar(&flags.sliceByteCount, "s", 2000, "block size in bytes (must be a multiple of 4)")
flagSet.IntVar(&flags.numParityShards, "c", 3, "number of recovery blocks to create (or files, for PAR1)")
flagSet.IntVar(&flags.sliceByteCount, "s", par2.SliceByteCountDefault, "block size in bytes (must be a multiple of 4) (PAR2 only)")
// par1.NumParityFilesDefault == par2.NumParityShardsDefault
flagSet.IntVar(&flags.numParityShards, "c", par2.NumParityShardsDefault, "number of recovery blocks to create (or files, for PAR1)")

return flagSet, &flags
}
Expand Down

0 comments on commit 6f9c2db

Please sign in to comment.