diff --git a/internal/assets/token_pool.go b/internal/assets/token_pool.go index 36c88d4fd..fcf7790d5 100644 --- a/internal/assets/token_pool.go +++ b/internal/assets/token_pool.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/definitions/handler_tokenpool.go b/internal/definitions/handler_tokenpool.go index 048f59cef..a6a01fb79 100644 --- a/internal/definitions/handler_tokenpool.go +++ b/internal/definitions/handler_tokenpool.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -92,6 +92,11 @@ func (dh *definitionHandler) handleTokenPoolDefinition(ctx context.Context, stat } } + if existing.ID.Equals(pool.ID) { + log.L(ctx).Warnf("Received duplicate token pool creation with ID=%s, ignoring and carrying on for token connector: %s", pool.ID, pool.Connector) + break + } + // Any other conflict - reject return HandlerResult{Action: core.ActionReject, CustomCorrelator: correlator}, i18n.NewError(ctx, coremsgs.MsgDefRejectedConflict, "token pool", pool.ID, existing.ID) }