Skip to content

Commit

Permalink
address some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Apr 26, 2024
1 parent 602fe25 commit cca159b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions node/plugin/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ func pluginOps(ctx *cli.Context) {
}
quorumIds, err := tx.GetRegisteredQuorumIdsForOperator(context.Background(), operatorID)
if err != nil {
log.Printf("Error: failed to get quorum(s) for operatorID: %x, operator address: %x, error: %v", operatorID, sk.Address, err)
log.Printf("Error: failed to get quorum(s) for operatorID: %x, operator address: %x, error: %v", operatorID, operatorAddress.Hex(), err)
return
}
log.Printf("Info: operator ID: %x, operator address: %x, current quorums: %v", operatorID, operatorAddress, quorumIds)
log.Printf("Info: operator ID: %x, operator address: %x, current quorums: %v", operatorID, operatorAddress.Hex(), quorumIds)
return
}

Expand Down
5 changes: 4 additions & 1 deletion node/plugin/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ func NewConfig(ctx *cli.Context) (*Config, error) {
return nil, errors.New("unsupported operation type")
}

if op != OperationListQuorums && len(ctx.GlobalString(EcdsaKeyFileFlag.Name)) == 0 && len(ctx.GlobalString(EcdsaKeyPasswordFlag.Name)) == 0 {
// ECDSA key is only required for opt-in, opt-out and update-socket operations
if (op == OperationOptIn || op == OperationOptOut || op == OperationUpdateSocket) &&
len(ctx.GlobalString(EcdsaKeyFileFlag.Name)) == 0 &&
len(ctx.GlobalString(EcdsaKeyPasswordFlag.Name)) == 0 {
return nil, errors.New("opt-in, opt-out and update-socket operations require ECDSA key file and password")
}

Expand Down

0 comments on commit cca159b

Please sign in to comment.