Skip to content

Commit

Permalink
Merge pull request #102 from kaleido-io/fix-reg
Browse files Browse the repository at this point in the history
PR 1467
  • Loading branch information
nguyer authored Mar 18, 2024
2 parents 5d37db5 + 66c38f8 commit 3674c85
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/identity/identitymanager.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Kaleido, Inc.
// Copyright © 2024 Kaleido, Inc.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -105,13 +105,12 @@ func ParseKeyNormalizationConfig(strConfigVal string) int {

func (im *identityManager) GetLocalNode(ctx context.Context) (node *core.Identity, err error) {
nodeName := im.multiparty.LocalNode().Name
if nodeName != "" {
nodeDID := fmt.Sprintf("%s%s", core.FireFlyNodeDIDPrefix, nodeName)
node, _, err = im.CachedIdentityLookupNilOK(ctx, nodeDID)
}
if err == nil && node == nil {
if nodeName == "" {
return nil, i18n.NewError(ctx, coremsgs.MsgLocalNodeNotSet)
}

nodeDID := fmt.Sprintf("%s%s", core.FireFlyNodeDIDPrefix, nodeName)
node, _, err = im.CachedIdentityLookupNilOK(ctx, nodeDID)
return node, err
}

Expand Down

0 comments on commit 3674c85

Please sign in to comment.