Skip to content

Commit

Permalink
go/oasis-node: Fix signer configuration via YAML
Browse files Browse the repository at this point in the history
The `--signer` argument has been renamed to `--signer.backend` to allow
signer configuration to be passed via a YAML config. Previously, this would
be impossible as `signer` would need to be both a string and a map at the
same time when set via a YAML config.
  • Loading branch information
kostko committed May 28, 2020
1 parent ff6b57c commit db3c52b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changelog/2949.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
go/oasis-node: Fix signer configuration via YAML

The `--signer` argument has been renamed to `--signer.backend` to allow
signer configuration to be passed via a YAML config. Previously, this would
be impossible as `signer` would need to be both a string and a map at the
same time when set via a YAML config.
2 changes: 1 addition & 1 deletion go/oasis-node/cmd/common/signer/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

const (
// CfgSigner is the flag used to specify the backend of the signer.
CfgSigner = "signer"
CfgSigner = "signer.backend"

// CfgCLISignerDir is the flag used to specify the directory with the
// entity files, for the purpose of some of the node sub-command's
Expand Down
4 changes: 2 additions & 2 deletions go/oasis-test-runner/oasis/entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (ent *Entity) Signer() signature.Signer {

func (ent *Entity) toGenesisArgs() []string {
if ent.dir != nil {
return []string{"--signer", fileSigner.SignerName, "--signer.dir", ent.dir.String()}
return []string{"--" + cmdSigner.CfgSigner, fileSigner.SignerName, "--" + cmdSigner.CfgCLISignerDir, ent.dir.String()}
} else if ent.isDebugTestEntity {
return entityArgsDebugTest
}
Expand Down Expand Up @@ -99,7 +99,7 @@ func (ent *Entity) update() error {
"--" + cmdSigner.CfgCLISignerDir, ent.dir.String(),
}
for _, n := range ent.nodes {
args = append(args, "--entity.node.id", n.String())
args = append(args, "--"+cmdEntity.CfgNodeID, n.String())
}

w, err := ent.dir.NewLogWriter("update.log")
Expand Down

0 comments on commit db3c52b

Please sign in to comment.