-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/createcluster: add fee-recipient and name flags #878
Conversation
…pient address and name in cluster lock creation
Codecov Report
@@ Coverage Diff @@
## main #878 +/- ##
==========================================
- Coverage 54.43% 54.41% -0.02%
==========================================
Files 114 114
Lines 12231 12229 -2
==========================================
- Hits 6658 6655 -3
- Misses 4613 4614 +1
Partials 960 960
Continue to review full report at Codecov.
|
cmd/createcluster.go
Outdated
@@ -81,9 +83,11 @@ func newCreateClusterCmd(runFunc func(io.Writer, clusterConfig) error) *cobra.Co | |||
} | |||
|
|||
func bindClusterFlags(flags *pflag.FlagSet, config *clusterConfig) { | |||
flags.StringVar(&config.Name, "name", clusterName, "Optional cosmetic cluster name") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest not defaulting to "", suggest using current default that is clusterName=local
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, technically not optional if there is a default, suggest removing "Optional" from description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if empty cluster name is fine, then at least remove clusterName
const
cmd/createcluster.go
Outdated
@@ -352,7 +356,7 @@ func newLock(conf clusterConfig, dvs []tbls.TSS, peers []p2p.Peer) (cluster.Lock | |||
}) | |||
} | |||
|
|||
def := cluster.NewDefinition(clusterName, len(dvs), conf.Threshold, "", "", "", ops, rand.Reader) | |||
def := cluster.NewDefinition(conf.Name, len(dvs), conf.Threshold, conf.FeeRecipient, conf.WithdrawalAddr, networkToForkVersion[conf.Network], ops, rand.Reader) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split very long lines
Adds fee recipient and name flags and use withdrawal address, fee recipient address and name in cluster lock creation. This will be useful for those who want to create a cluster without going through dkg process preferably centralised stakers.
category: refactor
ticket: #879