Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GOGC=30

all: build test go-mod-tidy
test: deps lint
$(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=10s
$(VGO) test ./internal/... ./pkg/... ./cmd/... -cover -coverprofile=coverage.txt -covermode=atomic -timeout=30s
coverage.html:
$(VGO) tool cover -html=coverage.txt
coverage: test coverage.html
Expand Down
2 changes: 1 addition & 1 deletion internal/events/dx_callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (em *eventManager) checkReceivedOffchainIdentity(ctx context.Context, peerI
}

// Find the identity in the mesage
org, retryable, err := em.identity.CachedIdentityLookup(ctx, author)
org, retryable, err := em.identity.CachedIdentityLookupMustExist(ctx, author)
if err != nil && retryable {
l.Errorf("Failed to retrieve org: %v", err)
return nil, err // retryable error
Expand Down
28 changes: 14 additions & 14 deletions internal/events/dx_callbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestPinnedReceiveOK(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertMessages", em.ctx, mock.Anything).Return(nil, nil)
Expand Down Expand Up @@ -136,7 +136,7 @@ func TestMessageReceiveOkBadBatchIgnored(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)

m, err := em.MessageReceived(mdx, "peer1", b)
assert.NoError(t, err)
Expand All @@ -162,7 +162,7 @@ func TestMessageReceivePersistBatchError(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(fmt.Errorf("pop"))
m, err := em.MessageReceived(mdx, "peer1", b)
assert.Regexp(t, "FF10158", err)
Expand Down Expand Up @@ -279,7 +279,7 @@ func TestMessageReceiveGetCandidateOrgFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(nil, true, fmt.Errorf("pop"))
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(nil, true, fmt.Errorf("pop"))
m, err := em.MessageReceived(mdx, "peer1", b)
assert.Regexp(t, "FF10158", err)
assert.Empty(t, m)
Expand All @@ -304,7 +304,7 @@ func TestMessageReceiveGetCandidateOrgNotFound(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(nil, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(nil, false, nil)
m, err := em.MessageReceived(mdx, "peer1", b)
assert.NoError(t, err)
assert.Empty(t, m)
Expand All @@ -329,7 +329,7 @@ func TestMessageReceiveGetCandidateOrgNotMatch(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(newTestOrg("org2"), false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(newTestOrg("org2"), false, nil)
m, err := em.MessageReceived(mdx, "peer1", b)
assert.NoError(t, err)
assert.Empty(t, m)
Expand Down Expand Up @@ -661,7 +661,7 @@ func TestMessageReceiveMessageIdentityFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupByID", em.ctx, org2.Parent).Return(nil, fmt.Errorf("pop"))

m, err := em.MessageReceived(mdx, "peer1", b)
Expand Down Expand Up @@ -693,7 +693,7 @@ func TestMessageReceiveMessageIdentityParentNotFound(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupByID", em.ctx, org2.Parent).Return(nil, nil)

m, err := em.MessageReceived(mdx, "peer1", b)
Expand Down Expand Up @@ -726,7 +726,7 @@ func TestMessageReceiveMessageIdentityIncorrect(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org2, false, nil)
mim.On("CachedIdentityLookupByID", em.ctx, org2.Parent).Return(org3, nil)

m, err := em.MessageReceived(mdx, "peer1", b)
Expand Down Expand Up @@ -757,7 +757,7 @@ func TestMessageReceiveMessagePersistMessageFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(nil)
mdi.On("InsertMessages", em.ctx, mock.Anything).Return(fmt.Errorf("optimization fail"))
Expand Down Expand Up @@ -791,7 +791,7 @@ func TestMessageReceiveMessagePersistDataFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(fmt.Errorf("optimization miss"))
mdi.On("UpsertData", em.ctx, mock.Anything, database.UpsertOptimizationExisting).Return(fmt.Errorf("pop"))
Expand Down Expand Up @@ -824,7 +824,7 @@ func TestMessageReceiveUnpinnedBatchOk(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(nil)
mdi.On("InsertMessages", em.ctx, mock.Anything).Return(nil)
Expand Down Expand Up @@ -862,7 +862,7 @@ func TestMessageReceiveUnpinnedBatchConfirmMessagesFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(nil)
mdi.On("InsertMessages", em.ctx, mock.Anything).Return(nil)
Expand Down Expand Up @@ -899,7 +899,7 @@ func TestMessageReceiveUnpinnedBatchPersistEventFail(t *testing.T) {
Type: fftypes.VerifierTypeFFDXPeerID,
Value: "peer1",
}).Return(node1, nil)
mim.On("CachedIdentityLookup", em.ctx, "signingOrg").Return(org1, false, nil)
mim.On("CachedIdentityLookupMustExist", em.ctx, "signingOrg").Return(org1, false, nil)
mdi.On("UpsertBatch", em.ctx, mock.Anything).Return(nil, nil)
mdi.On("InsertDataArray", em.ctx, mock.Anything).Return(nil)
mdi.On("InsertMessages", em.ctx, mock.Anything).Return(nil)
Expand Down
3 changes: 1 addition & 2 deletions internal/i18n/en_translations.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ var (
MsgTokensRESTErr = ffm("FF10274", "Error from tokens service: %s")
MsgTokenPoolDuplicate = ffm("FF10275", "Duplicate token pool")
MsgTokenPoolRejected = ffm("FF10276", "Token pool with ID '%s' was rejected. Please check the FireFly logs for more information")
MsgIdentityNotFoundByString = ffm("FF10277", "Identity could not be resolved via DID '%s'")
MsgAuthorOrgNotFoundByName = ffm("FF10278", "Author organization could not be resolved via name '%s'")
MsgIdentityNotFoundByString = ffm("FF10277", "Identity could not be resolved via lookup string '%s'")
MsgAuthorOrgSigningKeyMismatch = ffm("FF10279", "Author organization '%s' is not associated with signing key '%s'")
MsgCannotTransferToSelf = ffm("FF10280", "From and to addresses must be different", 400)
MsgLocalOrgLookupFailed = ffm("FF10281", "Unable resolve the local org '%s' by the configured signing key on the node. Please confirm the org is registered with key '%s'", 500)
Expand Down
32 changes: 20 additions & 12 deletions internal/identity/identitymanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ type Manager interface {
FindIdentityForVerifier(ctx context.Context, iTypes []fftypes.IdentityType, namespace string, verifier *fftypes.VerifierRef) (identity *fftypes.Identity, err error)
ResolveIdentitySigner(ctx context.Context, identity *fftypes.Identity) (parentSigner *fftypes.SignerRef, err error)
CachedIdentityLookupByID(ctx context.Context, id *fftypes.UUID) (identity *fftypes.Identity, err error)
CachedIdentityLookup(ctx context.Context, did string) (identity *fftypes.Identity, retryable bool, err error)
CachedIdentityLookupMustExist(ctx context.Context, did string) (identity *fftypes.Identity, retryable bool, err error)
CachedIdentityLookupNilOK(ctx context.Context, did string) (identity *fftypes.Identity, retryable bool, err error)
CachedVerifierLookup(ctx context.Context, vType fftypes.VerifierType, ns, value string) (verifier *fftypes.Verifier, err error)
GetNodeOwnerBlockchainKey(ctx context.Context) (*fftypes.VerifierRef, error)
GetNodeOwnerOrg(ctx context.Context) (*fftypes.Identity, error)
Expand Down Expand Up @@ -157,7 +158,7 @@ func (im *identityManager) ResolveInputSigningIdentity(ctx context.Context, name
return i18n.NewError(ctx, i18n.MsgAuthorRegistrationMismatch, verifier.Value, msgSignerRef.Author, identity.DID)
}
case msgSignerRef.Author != "":
identity, _, err := im.CachedIdentityLookup(ctx, msgSignerRef.Author)
identity, _, err := im.CachedIdentityLookupMustExist(ctx, msgSignerRef.Author)
if err != nil {
return err
}
Expand All @@ -168,7 +169,7 @@ func (im *identityManager) ResolveInputSigningIdentity(ctx context.Context, name
case msgSignerRef.Author != "":
// Author must be non-empty (see above), so we want to find that identity and then
// use the first blockchain key that's associated with it.
identity, _, err := im.CachedIdentityLookup(ctx, msgSignerRef.Author)
identity, _, err := im.CachedIdentityLookupMustExist(ctx, msgSignerRef.Author)
if err != nil {
return err
}
Expand Down Expand Up @@ -395,7 +396,7 @@ func (im *identityManager) cachedIdentityLookupByVerifierRef(ctx context.Context
return identity, nil
}

func (im *identityManager) CachedIdentityLookup(ctx context.Context, didLookupStr string) (identity *fftypes.Identity, retryable bool, err error) {
func (im *identityManager) CachedIdentityLookupNilOK(ctx context.Context, didLookupStr string) (identity *fftypes.Identity, retryable bool, err error) {
// Use an LRU cache for the author identity, as it's likely for the same identity to be re-used over and over
cacheKey := fmt.Sprintf("did=%s", didLookupStr)
defer func() {
Expand All @@ -422,21 +423,28 @@ func (im *identityManager) CachedIdentityLookup(ctx context.Context, didLookupSt
}
}
}
if identity == nil {
return nil, false, i18n.NewError(ctx, i18n.MsgIdentityNotFoundByString, didLookupStr)
}
} else {
// If there is just a name in there, then it could be an Org type identity (from the very original usage of the field)
if identity, err = im.database.GetIdentityByName(ctx, fftypes.IdentityTypeOrg, fftypes.SystemNamespace, didLookupStr); err != nil {
return nil, true /* DB Error */, err
}
if identity == nil {
return nil, false, i18n.NewError(ctx, i18n.MsgAuthorOrgNotFoundByName, didLookupStr)
}
}

// Cache the result
im.identityCache.Set(cacheKey, identity, im.identityCacheTTL)
if identity != nil {
// Cache the result
im.identityCache.Set(cacheKey, identity, im.identityCacheTTL)
}
}
return identity, false, nil
}

func (im *identityManager) CachedIdentityLookupMustExist(ctx context.Context, didLookupStr string) (identity *fftypes.Identity, retryable bool, err error) {
identity, retryable, err = im.CachedIdentityLookupNilOK(ctx, didLookupStr)
if err != nil {
return nil, retryable, err
}
if identity == nil {
return nil, false, i18n.NewError(ctx, i18n.MsgIdentityNotFoundByString, didLookupStr)
}
return identity, false, nil
}
Expand Down
18 changes: 9 additions & 9 deletions internal/identity/identitymanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func TestResolveInputSigningIdentityByOrgLookkupNotFound(t *testing.T) {
Author: "org1",
}
err := im.ResolveInputSigningIdentity(ctx, "ns1", msgIdentity)
assert.Regexp(t, "FF10278", err)
assert.Regexp(t, "FF10277", err)

mdi.AssertExpectations(t)

Expand Down Expand Up @@ -777,7 +777,7 @@ func TestCachedIdentityLookupByVerifierRefNotFound(t *testing.T) {

}

func TestCachedIdentityLookupCaching(t *testing.T) {
func TestCachedIdentityLookupMustExistCaching(t *testing.T) {

ctx, im := newTestIdentityManager(t)

Expand All @@ -793,33 +793,33 @@ func TestCachedIdentityLookupCaching(t *testing.T) {
mdi := im.database.(*databasemocks.Plugin)
mdi.On("GetIdentityByDID", ctx, "did:firefly:node/peer1").Return(id, nil).Once()

v1, _, err := im.CachedIdentityLookup(ctx, "did:firefly:node/peer1")
v1, _, err := im.CachedIdentityLookupMustExist(ctx, "did:firefly:node/peer1")
assert.NoError(t, err)
assert.Equal(t, id, v1)

v2, _, err := im.CachedIdentityLookup(ctx, "did:firefly:node/peer1")
v2, _, err := im.CachedIdentityLookupMustExist(ctx, "did:firefly:node/peer1")
assert.NoError(t, err)
assert.Equal(t, id, v2)
}

func TestCachedIdentityLookupUnknownResolver(t *testing.T) {
func TestCachedIdentityLookupMustExistUnknownResolver(t *testing.T) {

ctx, im := newTestIdentityManager(t)

_, retryable, err := im.CachedIdentityLookup(ctx, "did:random:anything")
_, retryable, err := im.CachedIdentityLookupMustExist(ctx, "did:random:anything")
assert.Regexp(t, "FF10349", err)
assert.False(t, retryable)

}

func TestCachedIdentityLookupGetIDFail(t *testing.T) {
func TestCachedIdentityLookupMustExistGetIDFail(t *testing.T) {

ctx, im := newTestIdentityManager(t)

mdi := im.database.(*databasemocks.Plugin)
mdi.On("GetIdentityByDID", ctx, "did:firefly:node/peer1").Return(nil, fmt.Errorf("pop"))

_, retryable, err := im.CachedIdentityLookup(ctx, "did:firefly:node/peer1")
_, retryable, err := im.CachedIdentityLookupMustExist(ctx, "did:firefly:node/peer1")
assert.Regexp(t, "pop", err)
assert.True(t, retryable)

Expand All @@ -838,7 +838,7 @@ func TestCachedIdentityLookupByVerifierByOldDIDFail(t *testing.T) {
return uuid.Equals(orgUUID)
})).Return(nil, fmt.Errorf("pop"))

_, retryable, err := im.CachedIdentityLookup(ctx, did)
_, retryable, err := im.CachedIdentityLookupMustExist(ctx, did)
assert.Regexp(t, "pop", err)
assert.True(t, retryable)

Expand Down
2 changes: 1 addition & 1 deletion internal/networkmap/data_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (nm *networkMap) GetIdentityByID(ctx context.Context, ns, id string) (*ffty
}

func (nm *networkMap) GetIdentityByDID(ctx context.Context, did string) (*fftypes.Identity, error) {
identity, _, err := nm.identity.CachedIdentityLookup(ctx, did)
identity, _, err := nm.identity.CachedIdentityLookupMustExist(ctx, did)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions internal/networkmap/data_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func TestGetVerifierByHashBadUUID(t *testing.T) {
func TestGetVerifierByDIDOk(t *testing.T) {
nm, cancel := newTestNetworkmap(t)
defer cancel()
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookup", nm.ctx, "did:firefly:org/abc").
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookupMustExist", nm.ctx, "did:firefly:org/abc").
Return(testOrg("abc"), true, nil)
id, err := nm.GetIdentityByDID(nm.ctx, "did:firefly:org/abc")
assert.NoError(t, err)
Expand All @@ -301,7 +301,7 @@ func TestGetVerifierByDIDOk(t *testing.T) {
func TestGetVerifierByDIDNotFound(t *testing.T) {
nm, cancel := newTestNetworkmap(t)
defer cancel()
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookup", nm.ctx, "did:firefly:org/abc").
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookupMustExist", nm.ctx, "did:firefly:org/abc").
Return(nil, true, nil)
id, err := nm.GetIdentityByDID(nm.ctx, "did:firefly:org/abc")
assert.Regexp(t, "FF10109", err)
Expand All @@ -311,7 +311,7 @@ func TestGetVerifierByDIDNotFound(t *testing.T) {
func TestGetVerifierByDIDNotErr(t *testing.T) {
nm, cancel := newTestNetworkmap(t)
defer cancel()
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookup", nm.ctx, "did:firefly:org/abc").
nm.identity.(*identitymanagermocks.Manager).On("CachedIdentityLookupMustExist", nm.ctx, "did:firefly:org/abc").
Return(nil, true, fmt.Errorf("pop"))
id, err := nm.GetIdentityByDID(nm.ctx, "did:firefly:org/abc")
assert.Regexp(t, "pop", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/networkmap/register_identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (nm *networkMap) RegisterIdentity(ctx context.Context, ns string, dto *ffty
parent, err = fftypes.ParseUUID(ctx, dto.Parent)
if err != nil {
// Or a DID
parentIdentity, _, err := nm.identity.CachedIdentityLookup(ctx, dto.Parent)
parentIdentity, _, err := nm.identity.CachedIdentityLookupMustExist(ctx, dto.Parent)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/networkmap/register_identity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestRegisterIdentityCustomWithParentFail(t *testing.T) {

mim := nm.identity.(*identitymanagermocks.Manager)
mim.On("VerifyIdentityChain", nm.ctx, mock.AnythingOfType("*fftypes.Identity")).Return(parentIdentity, false, nil)
mim.On("CachedIdentityLookup", nm.ctx, "did:firefly:org/parent1").Return(&fftypes.Identity{
mim.On("CachedIdentityLookupMustExist", nm.ctx, "did:firefly:org/parent1").Return(&fftypes.Identity{
IdentityBase: fftypes.IdentityBase{
ID: fftypes.NewUUID(),
DID: "did:firefly:org/parent1",
Expand Down Expand Up @@ -271,7 +271,7 @@ func TestRegisterIdentityBadParent(t *testing.T) {
defer cancel()

mim := nm.identity.(*identitymanagermocks.Manager)
mim.On("CachedIdentityLookup", nm.ctx, "did:firefly:org/1").Return(nil, false, fmt.Errorf("pop"))
mim.On("CachedIdentityLookupMustExist", nm.ctx, "did:firefly:org/1").Return(nil, false, fmt.Errorf("pop"))

_, err := nm.RegisterIdentity(nm.ctx, "ns1", &fftypes.IdentityCreateDTO{
Name: "custom1",
Expand Down
2 changes: 1 addition & 1 deletion internal/orchestrator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (or *orchestrator) GetStatus(ctx context.Context) (status *fftypes.NodeStat
status.Org.ID = org.ID
status.Org.DID = org.DID

node, _, err := or.identity.CachedIdentityLookup(ctx, fmt.Sprintf("%s%s", fftypes.FireFlyNodeDIDPrefix, status.Node.Name))
node, _, err := or.identity.CachedIdentityLookupNilOK(ctx, fmt.Sprintf("%s%s", fftypes.FireFlyNodeDIDPrefix, status.Node.Name))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the key change

if err != nil {
return nil, err
}
Expand Down
Loading