diff --git a/cmd/client.go b/cmd/client.go index 9b03b000..58b99074 100644 --- a/cmd/client.go +++ b/cmd/client.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_eventstreams.go b/cmd/client_eventstreams.go index 5320ff8c..f7186566 100644 --- a/cmd/client_eventstreams.go +++ b/cmd/client_eventstreams.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_eventstreams_delete.go b/cmd/client_eventstreams_delete.go index 1def5d69..b9ab7e62 100644 --- a/cmd/client_eventstreams_delete.go +++ b/cmd/client_eventstreams_delete.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -30,7 +30,7 @@ func clientEventStreamsDeleteCommand(clientFactory func() (apiclient.FFTMClient, Use: "delete", Short: "Delete event streams", Long: "", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { client, err := clientFactory() if err != nil { return err diff --git a/cmd/client_eventstreams_delete_test.go b/cmd/client_eventstreams_delete_test.go index f3f87da5..b259bbd0 100644 --- a/cmd/client_eventstreams_delete_test.go +++ b/cmd/client_eventstreams_delete_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_eventstreams_list.go b/cmd/client_eventstreams_list.go index 30909546..4cf0df20 100644 --- a/cmd/client_eventstreams_list.go +++ b/cmd/client_eventstreams_list.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -30,7 +30,7 @@ func clientEventStreamsListCommand(clientFactory func() (apiclient.FFTMClient, e Use: "list", Short: "List event streams", Long: "", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { client, err := clientFactory() if err != nil { return err diff --git a/cmd/client_eventstreams_list_test.go b/cmd/client_eventstreams_list_test.go index b218b4d2..943c948a 100644 --- a/cmd/client_eventstreams_list_test.go +++ b/cmd/client_eventstreams_list_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_listeners.go b/cmd/client_listeners.go index 7e1f2697..87da70ab 100644 --- a/cmd/client_listeners.go +++ b/cmd/client_listeners.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_listeners_delete.go b/cmd/client_listeners_delete.go index b2c97920..50cf4845 100644 --- a/cmd/client_listeners_delete.go +++ b/cmd/client_listeners_delete.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -30,7 +30,7 @@ func clientListenersDeleteCommand(clientFactory func() (apiclient.FFTMClient, er Use: "delete", Short: "Delete event streams", Long: "", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { client, err := clientFactory() if err != nil { return err diff --git a/cmd/client_listeners_delete_test.go b/cmd/client_listeners_delete_test.go index 7cb4b1e3..26368efa 100644 --- a/cmd/client_listeners_delete_test.go +++ b/cmd/client_listeners_delete_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_listeners_list.go b/cmd/client_listeners_list.go index 5e8513b0..5343b822 100644 --- a/cmd/client_listeners_list.go +++ b/cmd/client_listeners_list.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -30,7 +30,7 @@ func clientListenersListCommand(clientFactory func() (apiclient.FFTMClient, erro Use: "list", Short: "List listeners", Long: "", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { client, err := clientFactory() if err != nil { return err diff --git a/cmd/client_listeners_list_test.go b/cmd/client_listeners_list_test.go index 5f6ba8ca..3fff1829 100644 --- a/cmd/client_listeners_list_test.go +++ b/cmd/client_listeners_list_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/client_test.go b/cmd/client_test.go index 1d02d544..fefa336d 100644 --- a/cmd/client_test.go +++ b/cmd/client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/cmd/migrate.go b/cmd/migrate.go index 8c60a089..40c200d5 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -41,7 +41,7 @@ func buildLeveldb2postgresCommand(initConfig func() error) *cobra.Command { leveldb2postgresEventStreamsCmd := &cobra.Command{ Use: "leveldb2postgres", Short: "Migrate from LevelDB to PostgreSQL persistence", - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { if err := initConfig(); err != nil { return err } diff --git a/cmd/migrate_test.go b/cmd/migrate_test.go index e00ab483..db6e1c32 100644 --- a/cmd/migrate_test.go +++ b/cmd/migrate_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/apiclient/eventstreams.go b/internal/apiclient/eventstreams.go index df4cd92e..cf0569f6 100644 --- a/internal/apiclient/eventstreams.go +++ b/internal/apiclient/eventstreams.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/apiclient/eventstreams_test.go b/internal/apiclient/eventstreams_test.go index cf526444..1db4fc5e 100644 --- a/internal/apiclient/eventstreams_test.go +++ b/internal/apiclient/eventstreams_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/apiclient/fftm_client.go b/internal/apiclient/fftm_client.go index 99247470..d858287d 100644 --- a/internal/apiclient/fftm_client.go +++ b/internal/apiclient/fftm_client.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/apiclient/fftm_client_test.go b/internal/apiclient/fftm_client_test.go index bdbe74d5..01f65067 100644 --- a/internal/apiclient/fftm_client_test.go +++ b/internal/apiclient/fftm_client_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blocklistener/blocklistener.go b/internal/blocklistener/blocklistener.go index 98c0c55a..c8d7121b 100644 --- a/internal/blocklistener/blocklistener.go +++ b/internal/blocklistener/blocklistener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/blocklistener/blocklistener_test.go b/internal/blocklistener/blocklistener_test.go index b4d8ed29..b3f0ef9b 100644 --- a/internal/blocklistener/blocklistener_test.go +++ b/internal/blocklistener/blocklistener_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/confirmations/confirmations.go b/internal/confirmations/confirmations.go index daa9560a..d824727f 100644 --- a/internal/confirmations/confirmations.go +++ b/internal/confirmations/confirmations.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/confirmations/confirmations_test.go b/internal/confirmations/confirmations_test.go index bac0180b..7794fc7a 100644 --- a/internal/confirmations/confirmations_test.go +++ b/internal/confirmations/confirmations_test.go @@ -1,4 +1,4 @@ -// Copyright 2019 Kaleido +// Copyright 2024 Kaleido // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -32,14 +32,14 @@ import ( "github.com/stretchr/testify/mock" ) -func newTestBlockConfirmationManager(t *testing.T, enabled bool) (*blockConfirmationManager, *ffcapimocks.API) { +func newTestBlockConfirmationManager(t *testing.T, _ bool) (*blockConfirmationManager, *ffcapimocks.API) { tmconfig.Reset() config.Set(tmconfig.ConfirmationsRequired, 3) config.Set(tmconfig.ConfirmationsNotificationQueueLength, 1) return newTestBlockConfirmationManagerCustomConfig(t) } -func newTestBlockConfirmationManagerCustomConfig(t *testing.T) (*blockConfirmationManager, *ffcapimocks.API) { +func newTestBlockConfirmationManagerCustomConfig(_ *testing.T) (*blockConfirmationManager, *ffcapimocks.API) { logrus.SetLevel(logrus.DebugLevel) mca := &ffcapimocks.API{} bcm := NewBlockConfirmationManager(context.Background(), mca, "ut").(*blockConfirmationManager) diff --git a/internal/confirmations/receipt_checker.go b/internal/confirmations/receipt_checker.go index 569489a7..383f289a 100644 --- a/internal/confirmations/receipt_checker.go +++ b/internal/confirmations/receipt_checker.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -91,7 +91,7 @@ func (rc *receiptChecker) run(i int) { // We use the back-off retry handling of the retry loop to avoid tight loops, // but in the case of errors we re-queue the individual item to the back of the // queue so individual queued items do not get stuck for unrecoverable errors. - err := rc.bcm.retry.Do(ctx, "receipt check", func(attempt int) (bool, error) { + err := rc.bcm.retry.Do(ctx, "receipt check", func(_ int) (bool, error) { pending := rc.waitNext() if pending == nil { return false /* exit the retry loop with err */, i18n.NewError(ctx, tmmsgs.MsgShuttingDown) diff --git a/internal/confirmations/receipt_checker_test.go b/internal/confirmations/receipt_checker_test.go index 56cb6858..071949d3 100644 --- a/internal/confirmations/receipt_checker_test.go +++ b/internal/confirmations/receipt_checker_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/eventstream.go b/internal/events/eventstream.go index 2e918b38..371b78bf 100644 --- a/internal/events/eventstream.go +++ b/internal/events/eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -888,7 +888,7 @@ func (es *eventStream) writeCheckpoint(startedState *startedStreamState, batch * } // We only return if the context is cancelled, or the checkpoint succeeds - return es.retry.Do(startedState.ctx, "checkpoint", func(attempt int) (retry bool, err error) { + return es.retry.Do(startedState.ctx, "checkpoint", func(_ int) (retry bool, err error) { return true, es.persistence.WriteCheckpoint(startedState.ctx, cp) }) } diff --git a/internal/events/eventstream_test.go b/internal/events/eventstream_test.go index 501977e9..7dd6ad27 100644 --- a/internal/events/eventstream_test.go +++ b/internal/events/eventstream_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/listener.go b/internal/events/listener.go index 6e4aa75f..649abe22 100644 --- a/internal/events/listener.go +++ b/internal/events/listener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/webhooks.go b/internal/events/webhooks.go index 77101bab..9060e01c 100644 --- a/internal/events/webhooks.go +++ b/internal/events/webhooks.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/webhooks_test.go b/internal/events/webhooks_test.go index 4f31cd93..9e5adb79 100644 --- a/internal/events/webhooks_test.go +++ b/internal/events/webhooks_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/websockets.go b/internal/events/websockets.go index 011b19be..33096e83 100644 --- a/internal/events/websockets.go +++ b/internal/events/websockets.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/events/websockets_test.go b/internal/events/websockets_test.go index ad7cafad..0bd3ae13 100644 --- a/internal/events/websockets_test.go +++ b/internal/events/websockets_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index e7e73fab..f3d2d6d3 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/metrics/metrics_test.go b/internal/metrics/metrics_test.go index 8f3b8725..6ebf57d2 100644 --- a/internal/metrics/metrics_test.go +++ b/internal/metrics/metrics_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/dbmigration/leveldb2postgres.go b/internal/persistence/dbmigration/leveldb2postgres.go index d109c87f..16f39b26 100644 --- a/internal/persistence/dbmigration/leveldb2postgres.go +++ b/internal/persistence/dbmigration/leveldb2postgres.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/dbmigration/leveldb2postgres_test.go b/internal/persistence/dbmigration/leveldb2postgres_test.go index 2907b5a0..e47f8051 100644 --- a/internal/persistence/dbmigration/leveldb2postgres_test.go +++ b/internal/persistence/dbmigration/leveldb2postgres_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/dbmigration/migration.go b/internal/persistence/dbmigration/migration.go index 2cda267c..fb4396cf 100644 --- a/internal/persistence/dbmigration/migration.go +++ b/internal/persistence/dbmigration/migration.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/dbmigration/migration_test.go b/internal/persistence/dbmigration/migration_test.go index ecde1388..9ea349e0 100644 --- a/internal/persistence/dbmigration/migration_test.go +++ b/internal/persistence/dbmigration/migration_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/leveldb/leveldb_persistence.go b/internal/persistence/leveldb/leveldb_persistence.go index 7f53a2c3..31d73bad 100644 --- a/internal/persistence/leveldb/leveldb_persistence.go +++ b/internal/persistence/leveldb/leveldb_persistence.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/leveldb/leveldb_persistence_test.go b/internal/persistence/leveldb/leveldb_persistence_test.go index ba5f84e4..b1f08bf4 100644 --- a/internal/persistence/leveldb/leveldb_persistence_test.go +++ b/internal/persistence/leveldb/leveldb_persistence_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/leveldb/nonces.go b/internal/persistence/leveldb/nonces.go index 6fc617c4..e500fde4 100644 --- a/internal/persistence/leveldb/nonces.go +++ b/internal/persistence/leveldb/nonces.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/leveldb/nonces_test.go b/internal/persistence/leveldb/nonces_test.go index 476875be..04f0cbfd 100644 --- a/internal/persistence/leveldb/nonces_test.go +++ b/internal/persistence/leveldb/nonces_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/persistence.go b/internal/persistence/persistence.go index 5f289dbd..cef09430 100644 --- a/internal/persistence/persistence.go +++ b/internal/persistence/persistence.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/persistence_test.go b/internal/persistence/persistence_test.go index 78ed98b5..83d6b501 100644 --- a/internal/persistence/persistence_test.go +++ b/internal/persistence/persistence_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/checkpoints.go b/internal/persistence/postgres/checkpoints.go index 62d4d2e6..1af0ae7b 100644 --- a/internal/persistence/postgres/checkpoints.go +++ b/internal/persistence/postgres/checkpoints.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/checkpoints_test.go b/internal/persistence/postgres/checkpoints_test.go index 810ad3ed..ae3cac0e 100644 --- a/internal/persistence/postgres/checkpoints_test.go +++ b/internal/persistence/postgres/checkpoints_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/confirmations.go b/internal/persistence/postgres/confirmations.go index 48894402..7869cf4a 100644 --- a/internal/persistence/postgres/confirmations.go +++ b/internal/persistence/postgres/confirmations.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/confirmations_test.go b/internal/persistence/postgres/confirmations_test.go index 60cdacb8..16a6c59f 100644 --- a/internal/persistence/postgres/confirmations_test.go +++ b/internal/persistence/postgres/confirmations_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/eventstreams.go b/internal/persistence/postgres/eventstreams.go index 7bcafb31..54644581 100644 --- a/internal/persistence/postgres/eventstreams.go +++ b/internal/persistence/postgres/eventstreams.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/eventstreams_test.go b/internal/persistence/postgres/eventstreams_test.go index c5ac39aa..456e67f4 100644 --- a/internal/persistence/postgres/eventstreams_test.go +++ b/internal/persistence/postgres/eventstreams_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/listeners.go b/internal/persistence/postgres/listeners.go index cd4289f2..c6c7e39e 100644 --- a/internal/persistence/postgres/listeners.go +++ b/internal/persistence/postgres/listeners.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/listeners_test.go b/internal/persistence/postgres/listeners_test.go index c1562c33..3bdb9262 100644 --- a/internal/persistence/postgres/listeners_test.go +++ b/internal/persistence/postgres/listeners_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/postgres.go b/internal/persistence/postgres/postgres.go index d8ad93d4..ba86cd62 100644 --- a/internal/persistence/postgres/postgres.go +++ b/internal/persistence/postgres/postgres.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -50,7 +50,11 @@ func NewPostgresPersistence(bgCtx context.Context, conf config.Section, nonceSta if err := psql.Database.Init(bgCtx, psql, conf); err != nil { return nil, err } - return newSQLPersistence(bgCtx, &psql.Database, conf, nonceStateTimeout, codeOptions...) + p, err := newSQLPersistence(bgCtx, &psql.Database, conf, nonceStateTimeout, codeOptions...) + if err != nil { + return nil, err + } + return p, nil } func (psql *Postgres) Name() string { diff --git a/internal/persistence/postgres/postgres_test.go b/internal/persistence/postgres/postgres_test.go index dcd74ca1..2904d40e 100644 --- a/internal/persistence/postgres/postgres_test.go +++ b/internal/persistence/postgres/postgres_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/receipts.go b/internal/persistence/postgres/receipts.go index 5f98dd9d..e48088ff 100644 --- a/internal/persistence/postgres/receipts.go +++ b/internal/persistence/postgres/receipts.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/receipts_test.go b/internal/persistence/postgres/receipts_test.go index b0616f15..0b046f85 100644 --- a/internal/persistence/postgres/receipts_test.go +++ b/internal/persistence/postgres/receipts_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/sqlpersistence.go b/internal/persistence/postgres/sqlpersistence.go index da0511ff..530e6878 100644 --- a/internal/persistence/postgres/sqlpersistence.go +++ b/internal/persistence/postgres/sqlpersistence.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/sqlpersistence_test.go b/internal/persistence/postgres/sqlpersistence_test.go index 48addb5f..6feb9719 100644 --- a/internal/persistence/postgres/sqlpersistence_test.go +++ b/internal/persistence/postgres/sqlpersistence_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/transaction_writer_test.go b/internal/persistence/postgres/transaction_writer_test.go index 61856bef..df17cec0 100644 --- a/internal/persistence/postgres/transaction_writer_test.go +++ b/internal/persistence/postgres/transaction_writer_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/transactions.go b/internal/persistence/postgres/transactions.go index a1aac9da..affe45f9 100644 --- a/internal/persistence/postgres/transactions.go +++ b/internal/persistence/postgres/transactions.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/persistence/postgres/transactions_test.go b/internal/persistence/postgres/transactions_test.go index e6c17a9f..c3bc4ae8 100644 --- a/internal/persistence/postgres/transactions_test.go +++ b/internal/persistence/postgres/transactions_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -101,7 +101,6 @@ func TestTransactionBasicValidationPSQL(t *testing.T) { } err = p.AddTransactionConfirmations(ctx, txID, true, confirmations...) assert.NoError(t, err) - // A couple of transaction history entries err = p.AddSubStatusAction(ctx, txID, apitypes.TxSubStatusReceived, apitypes.TxActionAssignNonce, fftypes.JSONAnyPtr(`{"nonce":"11111"}`), nil) assert.NoError(t, err) diff --git a/internal/persistence/postgres/txhistory.go b/internal/persistence/postgres/txhistory.go index e791b747..78170ce9 100644 --- a/internal/persistence/postgres/txhistory.go +++ b/internal/persistence/postgres/txhistory.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -97,7 +97,7 @@ func (p *sqlPersistence) ListTransactionHistory(ctx context.Context, txID string func (p *sqlPersistence) AddSubStatusAction(ctx context.Context, txID string, subStatus apitypes.TxSubStatus, action apitypes.TxAction, info *fftypes.JSONAny, errInfo *fftypes.JSONAny) error { // Dispatch to TX writer - now := fftypes.Now() + t := &fftypes.FFTime{} op := newTransactionOperation(txID) op.historyRecord = &apitypes.TXHistoryRecord{ ID: fftypes.NewUUID(), @@ -105,15 +105,15 @@ func (p *sqlPersistence) AddSubStatusAction(ctx context.Context, txID string, su SubStatus: subStatus, TxHistoryActionEntry: apitypes.TxHistoryActionEntry{ OccurrenceCount: 1, - Time: now, - LastOccurrence: now, + Time: t, + LastOccurrence: t, Action: action, LastInfo: persistence.JSONOrString(info), // guard against bad JSON LastError: persistence.JSONOrString(errInfo), // guard against bad JSON }, } if errInfo != nil { - op.historyRecord.LastErrorTime = fftypes.Now() + op.historyRecord.LastErrorTime = t } p.writer.queue(ctx, op) return nil // completely async diff --git a/internal/persistence/postgres/txhistory_test.go b/internal/persistence/postgres/txhistory_test.go index 77cc7cc4..967330e2 100644 --- a/internal/persistence/postgres/txhistory_test.go +++ b/internal/persistence/postgres/txhistory_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/tmconfig/tmconfig.go b/internal/tmconfig/tmconfig.go index 0463dc85..57156af8 100644 --- a/internal/tmconfig/tmconfig.go +++ b/internal/tmconfig/tmconfig.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/tmconfig/tmconfig_test.go b/internal/tmconfig/tmconfig_test.go index 3a2413e4..325974a3 100644 --- a/internal/tmconfig/tmconfig_test.go +++ b/internal/tmconfig/tmconfig_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/tmmsgs/en_api_descriptions.go b/internal/tmmsgs/en_api_descriptions.go index f11767f2..df202243 100644 --- a/internal/tmmsgs/en_api_descriptions.go +++ b/internal/tmmsgs/en_api_descriptions.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/tmmsgs/en_error_messages.go b/internal/tmmsgs/en_error_messages.go index 9295d23f..9224149a 100644 --- a/internal/tmmsgs/en_error_messages.go +++ b/internal/tmmsgs/en_error_messages.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/ws/wsconn.go b/internal/ws/wsconn.go index 5caa1d6a..8f905246 100644 --- a/internal/ws/wsconn.go +++ b/internal/ws/wsconn.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/ws/wsserver.go b/internal/ws/wsserver.go index 11d97cae..c7c1f571 100644 --- a/internal/ws/wsserver.go +++ b/internal/ws/wsserver.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/internal/ws/wsserver_test.go b/internal/ws/wsserver_test.go index 2ad1ec9e..932c9a51 100644 --- a/internal/ws/wsserver_test.go +++ b/internal/ws/wsserver_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/api_types.go b/pkg/apitypes/api_types.go index 1ba04978..8e4fffd8 100644 --- a/pkg/apitypes/api_types.go +++ b/pkg/apitypes/api_types.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/api_types_test.go b/pkg/apitypes/api_types_test.go index d6001df2..eb7876d5 100644 --- a/pkg/apitypes/api_types_test.go +++ b/pkg/apitypes/api_types_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/base_request.go b/pkg/apitypes/base_request.go index 20c0f5d4..17acbd1f 100644 --- a/pkg/apitypes/base_request.go +++ b/pkg/apitypes/base_request.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/base_request_test.go b/pkg/apitypes/base_request_test.go index 05e4713a..12fd6af0 100644 --- a/pkg/apitypes/base_request_test.go +++ b/pkg/apitypes/base_request_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/managed_tx_test.go b/pkg/apitypes/managed_tx_test.go index 6eb84f29..21122c04 100644 --- a/pkg/apitypes/managed_tx_test.go +++ b/pkg/apitypes/managed_tx_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/tx_request.go b/pkg/apitypes/tx_request.go index 9da83fa5..edc54340 100644 --- a/pkg/apitypes/tx_request.go +++ b/pkg/apitypes/tx_request.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/ulid.go b/pkg/apitypes/ulid.go index 72ae1219..547ca797 100644 --- a/pkg/apitypes/ulid.go +++ b/pkg/apitypes/ulid.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/apitypes/ulid_test.go b/pkg/apitypes/ulid_test.go index d9c6560c..79b7f1bf 100644 --- a/pkg/apitypes/ulid_test.go +++ b/pkg/apitypes/ulid_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/address_balance.go b/pkg/ffcapi/address_balance.go index 8ac3bfbf..172800c8 100644 --- a/pkg/ffcapi/address_balance.go +++ b/pkg/ffcapi/address_balance.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/api.go b/pkg/ffcapi/api.go index 01255155..2562c469 100644 --- a/pkg/ffcapi/api.go +++ b/pkg/ffcapi/api.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/api_test.go b/pkg/ffcapi/api_test.go index 2cf29d64..73b48dd6 100644 --- a/pkg/ffcapi/api_test.go +++ b/pkg/ffcapi/api_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/block_info_by_hash.go b/pkg/ffcapi/block_info_by_hash.go index 7adb02b8..f9e1ecf5 100644 --- a/pkg/ffcapi/block_info_by_hash.go +++ b/pkg/ffcapi/block_info_by_hash.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/block_info_by_number.go b/pkg/ffcapi/block_info_by_number.go index d9c26112..23cac87f 100644 --- a/pkg/ffcapi/block_info_by_number.go +++ b/pkg/ffcapi/block_info_by_number.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/contract_deploy_prepare.go b/pkg/ffcapi/contract_deploy_prepare.go index b1d890c7..850f1f89 100644 --- a/pkg/ffcapi/contract_deploy_prepare.go +++ b/pkg/ffcapi/contract_deploy_prepare.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/event_listener_add.go b/pkg/ffcapi/event_listener_add.go index dea671d2..2aaa7a84 100644 --- a/pkg/ffcapi/event_listener_add.go +++ b/pkg/ffcapi/event_listener_add.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/event_listener_hwm.go b/pkg/ffcapi/event_listener_hwm.go index dd7dd6d7..074aa8c7 100644 --- a/pkg/ffcapi/event_listener_hwm.go +++ b/pkg/ffcapi/event_listener_hwm.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/event_listener_remove.go b/pkg/ffcapi/event_listener_remove.go index dc26298d..1a1ee549 100644 --- a/pkg/ffcapi/event_listener_remove.go +++ b/pkg/ffcapi/event_listener_remove.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/event_stream_start.go b/pkg/ffcapi/event_stream_start.go index 96f0590f..82008779 100644 --- a/pkg/ffcapi/event_stream_start.go +++ b/pkg/ffcapi/event_stream_start.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/event_stream_stopped.go b/pkg/ffcapi/event_stream_stopped.go index 1165e80b..ba77320e 100644 --- a/pkg/ffcapi/event_stream_stopped.go +++ b/pkg/ffcapi/event_stream_stopped.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/gas_estimate.go b/pkg/ffcapi/gas_estimate.go index 2f53759e..deada44f 100644 --- a/pkg/ffcapi/gas_estimate.go +++ b/pkg/ffcapi/gas_estimate.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/gas_price_estimate.go b/pkg/ffcapi/gas_price_estimate.go index 06b7d59d..0b1821d2 100644 --- a/pkg/ffcapi/gas_price_estimate.go +++ b/pkg/ffcapi/gas_price_estimate.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/is_live.go b/pkg/ffcapi/is_live.go index 7d2e83e0..7e1c9bbe 100644 --- a/pkg/ffcapi/is_live.go +++ b/pkg/ffcapi/is_live.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/is_ready.go b/pkg/ffcapi/is_ready.go index e77ea279..32e087d0 100644 --- a/pkg/ffcapi/is_ready.go +++ b/pkg/ffcapi/is_ready.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/new_block_listener.go b/pkg/ffcapi/new_block_listener.go index 4ee68db7..31643b83 100644 --- a/pkg/ffcapi/new_block_listener.go +++ b/pkg/ffcapi/new_block_listener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/next_nonce_for_signer.go b/pkg/ffcapi/next_nonce_for_signer.go index 9c3181e5..184d1a1e 100644 --- a/pkg/ffcapi/next_nonce_for_signer.go +++ b/pkg/ffcapi/next_nonce_for_signer.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/submission_error.go b/pkg/ffcapi/submission_error.go index 3214ce52..e8d6c59a 100644 --- a/pkg/ffcapi/submission_error.go +++ b/pkg/ffcapi/submission_error.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/submission_error_test.go b/pkg/ffcapi/submission_error_test.go index 01086bfc..ed864e40 100644 --- a/pkg/ffcapi/submission_error_test.go +++ b/pkg/ffcapi/submission_error_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/transaction_prepare.go b/pkg/ffcapi/transaction_prepare.go index a9552d90..1ba55611 100644 --- a/pkg/ffcapi/transaction_prepare.go +++ b/pkg/ffcapi/transaction_prepare.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/transaction_receipt.go b/pkg/ffcapi/transaction_receipt.go index 2decedac..0c365ec0 100644 --- a/pkg/ffcapi/transaction_receipt.go +++ b/pkg/ffcapi/transaction_receipt.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/ffcapi/transaction_send.go b/pkg/ffcapi/transaction_send.go index 043d09d0..fc1a4bdc 100644 --- a/pkg/ffcapi/transaction_send.go +++ b/pkg/ffcapi/transaction_send.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/address_management.go b/pkg/fftm/address_management.go index d0eac584..5fb2fc8f 100644 --- a/pkg/fftm/address_management.go +++ b/pkg/fftm/address_management.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/address_management_test.go b/pkg/fftm/address_management_test.go index d840125f..0d141a6a 100644 --- a/pkg/fftm/address_management_test.go +++ b/pkg/fftm/address_management_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/api.go b/pkg/fftm/api.go index c686d459..43a28de4 100644 --- a/pkg/fftm/api.go +++ b/pkg/fftm/api.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -59,7 +59,7 @@ func (m *manager) router(metricsEnabled bool) *mux.Router { mux.HandleFunc("/ws", m.wsServer.Handler) - mux.NotFoundHandler = hf.APIWrapper(func(res http.ResponseWriter, req *http.Request) (status int, err error) { + mux.NotFoundHandler = hf.APIWrapper(func(_ http.ResponseWriter, req *http.Request) (status int, err error) { return 404, i18n.NewError(req.Context(), i18n.Msg404NotFound) }) return mux diff --git a/pkg/fftm/api_test.go b/pkg/fftm/api_test.go index ce374845..c79dc5b1 100644 --- a/pkg/fftm/api_test.go +++ b/pkg/fftm/api_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/config_docs_generate_test.go b/pkg/fftm/config_docs_generate_test.go index 51596373..f317c818 100644 --- a/pkg/fftm/config_docs_generate_test.go +++ b/pkg/fftm/config_docs_generate_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/config_docs_test.go b/pkg/fftm/config_docs_test.go index ed3c74f2..5e5332e0 100644 --- a/pkg/fftm/config_docs_test.go +++ b/pkg/fftm/config_docs_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/gas_management.go b/pkg/fftm/gas_management.go index f01fdf9d..0567bc56 100644 --- a/pkg/fftm/gas_management.go +++ b/pkg/fftm/gas_management.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/manager.go b/pkg/fftm/manager.go index 8b27e641..de4064e0 100644 --- a/pkg/fftm/manager.go +++ b/pkg/fftm/manager.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/manager_test.go b/pkg/fftm/manager_test.go index bddffbc0..f17d857b 100644 --- a/pkg/fftm/manager_test.go +++ b/pkg/fftm/manager_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_eventstream.go b/pkg/fftm/route_delete_eventstream.go index 841a037c..0bdb0ef7 100644 --- a/pkg/fftm/route_delete_eventstream.go +++ b/pkg/fftm/route_delete_eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_eventstream_listener.go b/pkg/fftm/route_delete_eventstream_listener.go index 7dc890d8..f1b14b4d 100644 --- a/pkg/fftm/route_delete_eventstream_listener.go +++ b/pkg/fftm/route_delete_eventstream_listener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_eventstream_listener_test.go b/pkg/fftm/route_delete_eventstream_listener_test.go index 2b630c64..05d7a81c 100644 --- a/pkg/fftm/route_delete_eventstream_listener_test.go +++ b/pkg/fftm/route_delete_eventstream_listener_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_eventstream_test.go b/pkg/fftm/route_delete_eventstream_test.go index c2200703..a8724a43 100644 --- a/pkg/fftm/route_delete_eventstream_test.go +++ b/pkg/fftm/route_delete_eventstream_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_subscription.go b/pkg/fftm/route_delete_subscription.go index fd097996..9fa3f7c5 100644 --- a/pkg/fftm/route_delete_subscription.go +++ b/pkg/fftm/route_delete_subscription.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_subscription_test.go b/pkg/fftm/route_delete_subscription_test.go index 9214b85f..f59c516a 100644 --- a/pkg/fftm/route_delete_subscription_test.go +++ b/pkg/fftm/route_delete_subscription_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_transaction.go b/pkg/fftm/route_delete_transaction.go index 4cd29600..9494824f 100644 --- a/pkg/fftm/route_delete_transaction.go +++ b/pkg/fftm/route_delete_transaction.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_delete_transaction_test.go b/pkg/fftm/route_delete_transaction_test.go index 1ae0b10f..e3377a4e 100644 --- a/pkg/fftm/route_delete_transaction_test.go +++ b/pkg/fftm/route_delete_transaction_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_address_balance.go b/pkg/fftm/route_get_address_balance.go index c2a15370..ed35d012 100644 --- a/pkg/fftm/route_get_address_balance.go +++ b/pkg/fftm/route_get_address_balance.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_address_balance_test.go b/pkg/fftm/route_get_address_balance_test.go index 5564c09e..15d4de4a 100644 --- a/pkg/fftm/route_get_address_balance_test.go +++ b/pkg/fftm/route_get_address_balance_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream.go b/pkg/fftm/route_get_eventstream.go index 19694c98..29f25887 100644 --- a/pkg/fftm/route_get_eventstream.go +++ b/pkg/fftm/route_get_eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream_listener.go b/pkg/fftm/route_get_eventstream_listener.go index 2e80ea76..4f48478d 100644 --- a/pkg/fftm/route_get_eventstream_listener.go +++ b/pkg/fftm/route_get_eventstream_listener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream_listener_test.go b/pkg/fftm/route_get_eventstream_listener_test.go index 8769d41c..b25627d4 100644 --- a/pkg/fftm/route_get_eventstream_listener_test.go +++ b/pkg/fftm/route_get_eventstream_listener_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream_listeners.go b/pkg/fftm/route_get_eventstream_listeners.go index dbacfc5c..a8d3de10 100644 --- a/pkg/fftm/route_get_eventstream_listeners.go +++ b/pkg/fftm/route_get_eventstream_listeners.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream_listeners_test.go b/pkg/fftm/route_get_eventstream_listeners_test.go index 606c8382..7686a029 100644 --- a/pkg/fftm/route_get_eventstream_listeners_test.go +++ b/pkg/fftm/route_get_eventstream_listeners_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstream_test.go b/pkg/fftm/route_get_eventstream_test.go index 580465df..10b6dc61 100644 --- a/pkg/fftm/route_get_eventstream_test.go +++ b/pkg/fftm/route_get_eventstream_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstreams.go b/pkg/fftm/route_get_eventstreams.go index ee5f6c5a..9c1eea56 100644 --- a/pkg/fftm/route_get_eventstreams.go +++ b/pkg/fftm/route_get_eventstreams.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_eventstreams_test.go b/pkg/fftm/route_get_eventstreams_test.go index bc226487..fa30a967 100644 --- a/pkg/fftm/route_get_eventstreams_test.go +++ b/pkg/fftm/route_get_eventstreams_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_gas_price.go b/pkg/fftm/route_get_gas_price.go index 384fe8a8..89e4fe47 100644 --- a/pkg/fftm/route_get_gas_price.go +++ b/pkg/fftm/route_get_gas_price.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_gas_price_test.go b/pkg/fftm/route_get_gas_price_test.go index d1d1505c..13f9e297 100644 --- a/pkg/fftm/route_get_gas_price_test.go +++ b/pkg/fftm/route_get_gas_price_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_status_live.go b/pkg/fftm/route_get_status_live.go index 046c778c..e6ab0711 100644 --- a/pkg/fftm/route_get_status_live.go +++ b/pkg/fftm/route_get_status_live.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_status_live_test.go b/pkg/fftm/route_get_status_live_test.go index 73b51057..a4e12f9a 100644 --- a/pkg/fftm/route_get_status_live_test.go +++ b/pkg/fftm/route_get_status_live_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -17,13 +17,14 @@ package fftm import ( + "testing" + "github.com/go-resty/resty/v2" "github.com/hyperledger/firefly-transaction-manager/mocks/ffcapimocks" "github.com/hyperledger/firefly-transaction-manager/pkg/apitypes" "github.com/hyperledger/firefly-transaction-manager/pkg/ffcapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "testing" ) func TestGetLiveStatus(t *testing.T) { diff --git a/pkg/fftm/route_get_status_ready.go b/pkg/fftm/route_get_status_ready.go index dc397801..4b0c4d70 100644 --- a/pkg/fftm/route_get_status_ready.go +++ b/pkg/fftm/route_get_status_ready.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_status_ready_test.go b/pkg/fftm/route_get_status_ready_test.go index b98c0515..71026881 100644 --- a/pkg/fftm/route_get_status_ready_test.go +++ b/pkg/fftm/route_get_status_ready_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -17,13 +17,14 @@ package fftm import ( + "testing" + "github.com/go-resty/resty/v2" "github.com/hyperledger/firefly-transaction-manager/mocks/ffcapimocks" "github.com/hyperledger/firefly-transaction-manager/pkg/apitypes" "github.com/hyperledger/firefly-transaction-manager/pkg/ffcapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "testing" ) func TestGetReadyStatus(t *testing.T) { diff --git a/pkg/fftm/route_get_subscription.go b/pkg/fftm/route_get_subscription.go index 68d47e05..e81ef4a8 100644 --- a/pkg/fftm/route_get_subscription.go +++ b/pkg/fftm/route_get_subscription.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_subscription_test.go b/pkg/fftm/route_get_subscription_test.go index 4b3fa652..8e6fcb58 100644 --- a/pkg/fftm/route_get_subscription_test.go +++ b/pkg/fftm/route_get_subscription_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_subscriptions.go b/pkg/fftm/route_get_subscriptions.go index ad7d4910..5d0030b7 100644 --- a/pkg/fftm/route_get_subscriptions.go +++ b/pkg/fftm/route_get_subscriptions.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_subscriptions_test.go b/pkg/fftm/route_get_subscriptions_test.go index 9e8340f4..d8891caa 100644 --- a/pkg/fftm/route_get_subscriptions_test.go +++ b/pkg/fftm/route_get_subscriptions_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction.go b/pkg/fftm/route_get_transaction.go index 4ca23d32..44d55b68 100644 --- a/pkg/fftm/route_get_transaction.go +++ b/pkg/fftm/route_get_transaction.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_confirmations.go b/pkg/fftm/route_get_transaction_confirmations.go index 9905d20f..2511e352 100644 --- a/pkg/fftm/route_get_transaction_confirmations.go +++ b/pkg/fftm/route_get_transaction_confirmations.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_confirmations_test.go b/pkg/fftm/route_get_transaction_confirmations_test.go index 23c256fb..7b9f39d2 100644 --- a/pkg/fftm/route_get_transaction_confirmations_test.go +++ b/pkg/fftm/route_get_transaction_confirmations_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_history.go b/pkg/fftm/route_get_transaction_history.go index c5f7083a..9f4bfb4b 100644 --- a/pkg/fftm/route_get_transaction_history.go +++ b/pkg/fftm/route_get_transaction_history.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_history_test.go b/pkg/fftm/route_get_transaction_history_test.go index 1f210a14..4ea0c1de 100644 --- a/pkg/fftm/route_get_transaction_history_test.go +++ b/pkg/fftm/route_get_transaction_history_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_receipt.go b/pkg/fftm/route_get_transaction_receipt.go index 076ab215..66cc5fa1 100644 --- a/pkg/fftm/route_get_transaction_receipt.go +++ b/pkg/fftm/route_get_transaction_receipt.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_receipt_test.go b/pkg/fftm/route_get_transaction_receipt_test.go index 81ed61e6..699efec9 100644 --- a/pkg/fftm/route_get_transaction_receipt_test.go +++ b/pkg/fftm/route_get_transaction_receipt_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transaction_test.go b/pkg/fftm/route_get_transaction_test.go index a4064ffc..a26eb88f 100644 --- a/pkg/fftm/route_get_transaction_test.go +++ b/pkg/fftm/route_get_transaction_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transactions.go b/pkg/fftm/route_get_transactions.go index b31d791d..5bfa4697 100644 --- a/pkg/fftm/route_get_transactions.go +++ b/pkg/fftm/route_get_transactions.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_get_transactions_test.go b/pkg/fftm/route_get_transactions_test.go index 75fa1070..dcc34874 100644 --- a/pkg/fftm/route_get_transactions_test.go +++ b/pkg/fftm/route_get_transactions_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_eventstream.go b/pkg/fftm/route_patch_eventstream.go index 8ebb395e..7082e8a7 100644 --- a/pkg/fftm/route_patch_eventstream.go +++ b/pkg/fftm/route_patch_eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_eventstream_listener.go b/pkg/fftm/route_patch_eventstream_listener.go index 76302cc4..8a4321bf 100644 --- a/pkg/fftm/route_patch_eventstream_listener.go +++ b/pkg/fftm/route_patch_eventstream_listener.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_eventstream_listener_test.go b/pkg/fftm/route_patch_eventstream_listener_test.go index 74076573..47fe64fe 100644 --- a/pkg/fftm/route_patch_eventstream_listener_test.go +++ b/pkg/fftm/route_patch_eventstream_listener_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_eventstream_test.go b/pkg/fftm/route_patch_eventstream_test.go index 7d5dc2f1..4b56a452 100644 --- a/pkg/fftm/route_patch_eventstream_test.go +++ b/pkg/fftm/route_patch_eventstream_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_subscription.go b/pkg/fftm/route_patch_subscription.go index 9ae7ce22..10d0fed0 100644 --- a/pkg/fftm/route_patch_subscription.go +++ b/pkg/fftm/route_patch_subscription.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_patch_subscription_test.go b/pkg/fftm/route_patch_subscription_test.go index 47b56146..53dab0df 100644 --- a/pkg/fftm/route_patch_subscription_test.go +++ b/pkg/fftm/route_patch_subscription_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream.go b/pkg/fftm/route_post_eventstream.go index c41d70cb..3ebb3bc9 100644 --- a/pkg/fftm/route_post_eventstream.go +++ b/pkg/fftm/route_post_eventstream.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_listener_reset.go b/pkg/fftm/route_post_eventstream_listener_reset.go index 39741977..a8f14270 100644 --- a/pkg/fftm/route_post_eventstream_listener_reset.go +++ b/pkg/fftm/route_post_eventstream_listener_reset.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_listener_reset_test.go b/pkg/fftm/route_post_eventstream_listener_reset_test.go index 77273ea9..b6f6114d 100644 --- a/pkg/fftm/route_post_eventstream_listener_reset_test.go +++ b/pkg/fftm/route_post_eventstream_listener_reset_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_listeners.go b/pkg/fftm/route_post_eventstream_listeners.go index c5e03f08..e473ad2b 100644 --- a/pkg/fftm/route_post_eventstream_listeners.go +++ b/pkg/fftm/route_post_eventstream_listeners.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_listeners_test.go b/pkg/fftm/route_post_eventstream_listeners_test.go index f40343c5..fa2fc47c 100644 --- a/pkg/fftm/route_post_eventstream_listeners_test.go +++ b/pkg/fftm/route_post_eventstream_listeners_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_resume.go b/pkg/fftm/route_post_eventstream_resume.go index ce9c2931..1bc1f6b9 100644 --- a/pkg/fftm/route_post_eventstream_resume.go +++ b/pkg/fftm/route_post_eventstream_resume.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_resume_test.go b/pkg/fftm/route_post_eventstream_resume_test.go index 886161bd..df950fb3 100644 --- a/pkg/fftm/route_post_eventstream_resume_test.go +++ b/pkg/fftm/route_post_eventstream_resume_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_suspend.go b/pkg/fftm/route_post_eventstream_suspend.go index 3551ee42..41b87dc3 100644 --- a/pkg/fftm/route_post_eventstream_suspend.go +++ b/pkg/fftm/route_post_eventstream_suspend.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_suspend_test.go b/pkg/fftm/route_post_eventstream_suspend_test.go index dc70c438..68581b7e 100644 --- a/pkg/fftm/route_post_eventstream_suspend_test.go +++ b/pkg/fftm/route_post_eventstream_suspend_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_eventstream_test.go b/pkg/fftm/route_post_eventstream_test.go index 24c24863..34a78ce9 100644 --- a/pkg/fftm/route_post_eventstream_test.go +++ b/pkg/fftm/route_post_eventstream_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_subscription_reset.go b/pkg/fftm/route_post_subscription_reset.go index d6f82f91..9737a613 100644 --- a/pkg/fftm/route_post_subscription_reset.go +++ b/pkg/fftm/route_post_subscription_reset.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_subscription_reset_test.go b/pkg/fftm/route_post_subscription_reset_test.go index cf764071..3e98f256 100644 --- a/pkg/fftm/route_post_subscription_reset_test.go +++ b/pkg/fftm/route_post_subscription_reset_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_subscriptions.go b/pkg/fftm/route_post_subscriptions.go index 313a5fd9..24fda3f4 100644 --- a/pkg/fftm/route_post_subscriptions.go +++ b/pkg/fftm/route_post_subscriptions.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_subscriptions_test.go b/pkg/fftm/route_post_subscriptions_test.go index eca6b0a5..7dfb9ce5 100644 --- a/pkg/fftm/route_post_subscriptions_test.go +++ b/pkg/fftm/route_post_subscriptions_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_transaction_resume.go b/pkg/fftm/route_post_transaction_resume.go index 0d815e32..6b33691d 100644 --- a/pkg/fftm/route_post_transaction_resume.go +++ b/pkg/fftm/route_post_transaction_resume.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_transaction_resume_test.go b/pkg/fftm/route_post_transaction_resume_test.go index 40b2e148..0b2956bb 100644 --- a/pkg/fftm/route_post_transaction_resume_test.go +++ b/pkg/fftm/route_post_transaction_resume_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_transaction_suspend.go b/pkg/fftm/route_post_transaction_suspend.go index ad9de3dc..50723d25 100644 --- a/pkg/fftm/route_post_transaction_suspend.go +++ b/pkg/fftm/route_post_transaction_suspend.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/route_post_transaction_suspend_test.go b/pkg/fftm/route_post_transaction_suspend_test.go index 8cd121d2..3af8c5c2 100644 --- a/pkg/fftm/route_post_transaction_suspend_test.go +++ b/pkg/fftm/route_post_transaction_suspend_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/routes.go b/pkg/fftm/routes.go index d6472040..0c4a4a09 100644 --- a/pkg/fftm/routes.go +++ b/pkg/fftm/routes.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/status_management.go b/pkg/fftm/status_management.go index 0b31c3af..b89c8411 100644 --- a/pkg/fftm/status_management.go +++ b/pkg/fftm/status_management.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/status_management_test.go b/pkg/fftm/status_management_test.go index cfe4577c..763ac195 100644 --- a/pkg/fftm/status_management_test.go +++ b/pkg/fftm/status_management_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -18,11 +18,12 @@ package fftm import ( "fmt" + "testing" + "github.com/hyperledger/firefly-transaction-manager/mocks/ffcapimocks" "github.com/hyperledger/firefly-transaction-manager/pkg/ffcapi" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "testing" ) func TestGetLiveStatusError(t *testing.T) { diff --git a/pkg/fftm/stream_management.go b/pkg/fftm/stream_management.go index 7ff02713..a79b2416 100644 --- a/pkg/fftm/stream_management.go +++ b/pkg/fftm/stream_management.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/stream_management_test.go b/pkg/fftm/stream_management_test.go index 5cbfe36e..51aa1f15 100644 --- a/pkg/fftm/stream_management_test.go +++ b/pkg/fftm/stream_management_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/transaction_events_handler.go b/pkg/fftm/transaction_events_handler.go index 316f0be5..a732ca7e 100644 --- a/pkg/fftm/transaction_events_handler.go +++ b/pkg/fftm/transaction_events_handler.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/transaction_events_handler_test.go b/pkg/fftm/transaction_events_handler_test.go index d0ea6bcc..3ded91e4 100644 --- a/pkg/fftm/transaction_events_handler_test.go +++ b/pkg/fftm/transaction_events_handler_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/transaction_management.go b/pkg/fftm/transaction_management.go index c8d4ebc1..f463db07 100644 --- a/pkg/fftm/transaction_management.go +++ b/pkg/fftm/transaction_management.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/fftm/transaction_management_test.go b/pkg/fftm/transaction_management_test.go index 44cddac3..488909f8 100644 --- a/pkg/fftm/transaction_management_test.go +++ b/pkg/fftm/transaction_management_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/registry/registry.go b/pkg/txhandler/registry/registry.go index 10e7fd25..efc6c427 100644 --- a/pkg/txhandler/registry/registry.go +++ b/pkg/txhandler/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/registry/registry_test.go b/pkg/txhandler/registry/registry_test.go index c371a23a..0a2ebb1c 100644 --- a/pkg/txhandler/registry/registry_test.go +++ b/pkg/txhandler/registry/registry_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/simple/config.go b/pkg/txhandler/simple/config.go index a235e534..3eb5b150 100644 --- a/pkg/txhandler/simple/config.go +++ b/pkg/txhandler/simple/config.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/simple/metrics.go b/pkg/txhandler/simple/metrics.go index 044a7cda..a55d33d8 100644 --- a/pkg/txhandler/simple/metrics.go +++ b/pkg/txhandler/simple/metrics.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/simple/policyloop.go b/pkg/txhandler/simple/policyloop.go index bc52491e..d529636b 100644 --- a/pkg/txhandler/simple/policyloop.go +++ b/pkg/txhandler/simple/policyloop.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -125,7 +125,7 @@ func (sth *simpleTransactionHandler) updateInflightSet(ctx context.Context) bool } var additional []*apitypes.ManagedTX // We retry the get from persistence indefinitely (until the context cancels) - err := sth.retry.Do(ctx, "get pending transactions", func(attempt int) (retry bool, err error) { + err := sth.retry.Do(ctx, "get pending transactions", func(_ int) (retry bool, err error) { additional, err = sth.toolkit.TXPersistence.ListTransactionsPending(ctx, after, spaces, 0) return true, err }) diff --git a/pkg/txhandler/simple/policyloop_test.go b/pkg/txhandler/simple/policyloop_test.go index d134c917..74cdc369 100644 --- a/pkg/txhandler/simple/policyloop_test.go +++ b/pkg/txhandler/simple/policyloop_test.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/simple/simple_transaction_hander_test.go b/pkg/txhandler/simple/simple_transaction_hander_test.go index 70534ce9..2e725199 100644 --- a/pkg/txhandler/simple/simple_transaction_hander_test.go +++ b/pkg/txhandler/simple/simple_transaction_hander_test.go @@ -1,4 +1,4 @@ -// Copyright © 2022 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // @@ -99,12 +99,12 @@ func newTestTransactionHandlerFactoryWithFilePersistence(t *testing.T) (*Transac mockFFCAPI := &ffcapimocks.API{} return f, &txhandler.Toolkit{ - Connector: mockFFCAPI, - TXHistory: filePersistence, - TXPersistence: filePersistence, - MetricsManager: metrics.NewMetricsManager(context.Background()), - EventHandler: mockEventHandler, - }, mockFFCAPI, conf + Connector: mockFFCAPI, + TXHistory: filePersistence, + TXPersistence: filePersistence, + MetricsManager: metrics.NewMetricsManager(context.Background()), + EventHandler: mockEventHandler, + }, mockFFCAPI, conf } func newTestTransactionHandler(t *testing.T) txhandler.TransactionHandler { diff --git a/pkg/txhandler/simple/simple_transaction_handler.go b/pkg/txhandler/simple/simple_transaction_handler.go index 091fa0ac..c4434c9b 100644 --- a/pkg/txhandler/simple/simple_transaction_handler.go +++ b/pkg/txhandler/simple/simple_transaction_handler.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 // diff --git a/pkg/txhandler/txhandler.go b/pkg/txhandler/txhandler.go index 6ff70c21..4337c1bf 100644 --- a/pkg/txhandler/txhandler.go +++ b/pkg/txhandler/txhandler.go @@ -1,4 +1,4 @@ -// Copyright © 2023 Kaleido, Inc. +// Copyright © 2024 Kaleido, Inc. // // SPDX-License-Identifier: Apache-2.0 //