Merge pull request #107 from halseth/node-key-cli-arg

cmd/pool: allow ratings nodekey without named flag
This commit is contained in:
Oliver Gugger 2020-10-15 10:36:41 +02:00 committed by GitHub
commit 90a74b34ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,7 +287,15 @@ func ratings(ctx *cli.Context) error {
}
defer cleanup()
nodeKey := ctx.String("node_key")
var nodeKey string
switch {
case ctx.Args().Present():
nodeKey = ctx.Args().First()
default:
nodeKey = ctx.String("node_key")
}
if nodeKey == "" {
return fmt.Errorf("an LN node key must be provided")
}