diff --git a/pkg/solana/client/client.go b/pkg/solana/client/client.go index 89175f511..d0990b419 100644 --- a/pkg/solana/client/client.go +++ b/pkg/solana/client/client.go @@ -10,8 +10,9 @@ import ( "github.com/gagliardetto/solana-go/rpc" "golang.org/x/sync/singleflight" + "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" ) const ( diff --git a/pkg/solana/logger/logger.go b/pkg/solana/logger/logger.go deleted file mode 100644 index 819a75a7d..000000000 --- a/pkg/solana/logger/logger.go +++ /dev/null @@ -1,6 +0,0 @@ -package logger - -import "github.com/smartcontractkit/chainlink-common/pkg/logger" - -// Logger is an alias for backwards compatibility. -type Logger = logger.Logger diff --git a/pkg/solana/relay.go b/pkg/solana/relay.go index 91057e123..6b1424626 100644 --- a/pkg/solana/relay.go +++ b/pkg/solana/relay.go @@ -11,12 +11,11 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2/reportingplugin/median" "github.com/smartcontractkit/libocr/offchainreporting2/types" - relaylogger "github.com/smartcontractkit/chainlink-common/pkg/logger" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" relaytypes "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" "github.com/smartcontractkit/chainlink-solana/pkg/solana/txm" ) @@ -99,7 +98,7 @@ func (r *Relayer) NewContractReader(_ []byte) (relaytypes.ContractReader, error) func (r *Relayer) NewMedianProvider(rargs relaytypes.RelayArgs, pargs relaytypes.PluginArgs) (relaytypes.MedianProvider, error) { ctx, cancel := r.stopCh.NewCtx() defer cancel() - lggr := relaylogger.Named(r.lggr, "MedianProvider") + lggr := logger.Named(r.lggr, "MedianProvider") configWatcher, err := newConfigProvider(ctx, lggr, r.chain, rargs) if err != nil { return nil, err @@ -168,7 +167,7 @@ type configProvider struct { } func newConfigProvider(ctx context.Context, lggr logger.Logger, chain Chain, args relaytypes.RelayArgs) (*configProvider, error) { - lggr = relaylogger.Named(lggr, "ConfigProvider") + lggr = logger.Named(lggr, "ConfigProvider") var relayConfig RelayConfig err := json.Unmarshal(args.RelayConfig, &relayConfig) if err != nil { diff --git a/pkg/solana/state_cache.go b/pkg/solana/state_cache.go index a55ea3930..abd8d2fc7 100644 --- a/pkg/solana/state_cache.go +++ b/pkg/solana/state_cache.go @@ -12,12 +12,12 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" ) var ( diff --git a/pkg/solana/transmissions_cache.go b/pkg/solana/transmissions_cache.go index 27763caaf..c063cf489 100644 --- a/pkg/solana/transmissions_cache.go +++ b/pkg/solana/transmissions_cache.go @@ -11,12 +11,12 @@ import ( "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" ) type TransmissionsCache struct { diff --git a/pkg/solana/transmitter.go b/pkg/solana/transmitter.go index 51e31d8ba..55139d217 100644 --- a/pkg/solana/transmitter.go +++ b/pkg/solana/transmitter.go @@ -9,10 +9,10 @@ import ( "github.com/gagliardetto/solana-go" "github.com/smartcontractkit/libocr/offchainreporting2/types" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/utils" "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" ) var _ types.ContractTransmitter = (*Transmitter)(nil) diff --git a/pkg/solana/txm/txm.go b/pkg/solana/txm/txm.go index c6b2d709f..e3a66ee48 100644 --- a/pkg/solana/txm/txm.go +++ b/pkg/solana/txm/txm.go @@ -12,14 +12,13 @@ import ( "github.com/gagliardetto/solana-go/rpc" "github.com/google/uuid" + "github.com/smartcontractkit/chainlink-common/pkg/logger" "github.com/smartcontractkit/chainlink-common/pkg/services" + relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" solanaClient "github.com/smartcontractkit/chainlink-solana/pkg/solana/client" "github.com/smartcontractkit/chainlink-solana/pkg/solana/config" "github.com/smartcontractkit/chainlink-solana/pkg/solana/fees" - "github.com/smartcontractkit/chainlink-solana/pkg/solana/logger" - - relayutils "github.com/smartcontractkit/chainlink-common/pkg/utils" ) const ( @@ -492,7 +491,7 @@ func (txm *Txm) simulate(ctx context.Context) { // unrecognized errors (indicates more concerning failures) default: txm.txs.OnError(msg.signature, TxFailSimOther) // cancel retry - txm.lggr.Warnw("simulate: unrecognized error", "id", msg.id, "signature", msg.signature, "result", res) + txm.lggr.Errorw("simulate: unrecognized error", "id", msg.id, "signature", msg.signature, "result", res) continue } }