Skip to content

Commit

Permalink
chore: remove the word chainset from variables and comments (#10421)
Browse files Browse the repository at this point in the history
  • Loading branch information
krehermann authored Aug 31, 2023
1 parent 1a9154b commit aa888f1
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion core/chains/solana/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (v *verifiedCachedClient) GetAccountInfoWithOpts(ctx context.Context, addr
}

func newChain(id string, cfg *SolanaConfig, ks loop.Keystore, cfgs Configs, lggr logger.Logger) (*chain, error) {
lggr = logger.With(lggr, "chainID", id, "chainSet", "solana")
lggr = logger.With(lggr, "chainID", id, "chain", "solana")
var ch = chain{
id: id,
cfg: cfg,
Expand Down
4 changes: 2 additions & 2 deletions core/internal/features/ocr2/features_ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ func TestIntegration_OCR2(t *testing.T) {
err = bootstrapNode.app.Start(testutils.Context(t))
require.NoError(t, err)

chainSet := bootstrapNode.app.GetRelayers().LegacyEVMChains()
require.NotNil(t, chainSet)
emvChains := bootstrapNode.app.GetRelayers().LegacyEVMChains()
require.NotNil(t, emvChains)
ocrJob, err := ocrbootstrap.ValidatedBootstrapSpecToml(fmt.Sprintf(`
type = "bootstrap"
name = "bootstrap"
Expand Down
12 changes: 6 additions & 6 deletions core/services/chainlink/relayer_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type EVMFactoryConfig struct {
}

func (r *RelayerFactory) NewEVM(ctx context.Context, config EVMFactoryConfig) (map[relay.ID]evmrelay.LoopRelayAdapter, error) {
// TODO impl EVM loop. For now always 'fallback' to an adapter and embedded chainset
// TODO impl EVM loop. For now always 'fallback' to an adapter and embedded chain

relayers := make(map[relay.ID]evmrelay.LoopRelayAdapter)

Expand Down Expand Up @@ -101,7 +101,8 @@ func (r *RelayerFactory) NewSolana(ks keystore.Solana, chainCfgs solana.SolanaCo
continue
}

// all the lower level APIs expect chainsets. create a single valued set per id
// all the lower level APIs expect a config slice. create a single valued set per id
// TODO BCF-2605: clean this up
singleChainCfg := solana.SolanaConfigs{chainCfg}

if cmdName := env.SolanaPluginCmd.Get(); cmdName != "" {
Expand Down Expand Up @@ -174,7 +175,8 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs starknet.St
continue
}

// all the lower level APIs expect chainsets. create a single valued set per id
// all the lower level APIs expect a config slice. create a single valued set per id
// TODO BCF-2605: clean this up
singleChainCfg := starknet.StarknetConfigs{chainCfg}

if cmdName := env.StarknetPluginCmd.Get(); cmdName != "" {
Expand All @@ -197,7 +199,7 @@ func (r *RelayerFactory) NewStarkNet(ks keystore.StarkNet, chainCfgs starknet.St
// be compatible with instantiating a starknet transaction manager KeystoreAdapter within the LOOPp executable.
starknetRelayers[relayId] = loop.NewRelayerService(starkLggr, r.GRPCOpts, starknetCmdFn, string(cfgTOML), loopKs)
} else {
// fallback to embedded chainset
// fallback to embedded chain
opts := starknet.ChainOpts{
Logger: starkLggr,
KeyStore: loopKs,
Expand Down Expand Up @@ -230,8 +232,6 @@ func (r *RelayerFactory) NewCosmos(ctx context.Context, config CosmosFactoryConf
// create one relayer per chain id
for _, chainCfg := range config.CosmosConfigs {
relayId := relay.ID{Network: relay.Cosmos, ChainID: relay.ChainID(*chainCfg.ChainID)}
// all the lower level APIs expect chainsets. create a single valued set per id
// TODO: Cosmos LOOPp impl. For now, use relayer adapter

opts := cosmos.ChainOpts{
QueryConfig: r.QConfig,
Expand Down
2 changes: 1 addition & 1 deletion core/services/ocr2/delegate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestGetEVMEffectiveTransmitterID(t *testing.T) {
})
}

t.Run("when forwarders are enabled and chainset retrieval fails, error should be handled", func(t *testing.T) {
t.Run("when forwarders are enabled and chain retrieval fails, error should be handled", func(t *testing.T) {
jb, err := ocr2validate.ValidatedOracleSpecToml(config.OCR2(), config.Insecure(), testspecs.OCR2EVMSpecMinimal)
require.NoError(t, err)
jb.ForwardingAllowed = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,8 @@ func runOCR2VRFTest(t *testing.T, useForwarders bool) {
err = bootstrapNode.app.Start(testutils.Context(t))
require.NoError(t, err)

chainSet := bootstrapNode.app.GetRelayers().LegacyEVMChains()
require.NotNil(t, chainSet)
evmChains := bootstrapNode.app.GetRelayers().LegacyEVMChains()
require.NotNil(t, evmChains)
bootstrapJobSpec := fmt.Sprintf(`
type = "bootstrap"
name = "bootstrap"
Expand Down
3 changes: 1 addition & 2 deletions core/services/relay/evm/relayer_extender.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (s *ChainRelayerExt) Close() (err error) {
}

func (s *ChainRelayerExt) Name() string {
// we set each private chainSet logger to contain the chain id
return s.chain.Name()
}

Expand All @@ -142,7 +141,7 @@ func (s *ChainRelayerExt) Ready() (err error) {

var ErrInconsistentChainRelayerExtender = errors.New("inconsistent evm chain relayer extender")

// Chainset interface remove after BFC-2441
// Legacy interface remove after BFC-2441, BCF-2564

func (s *ChainRelayerExt) SendTx(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error {
return s.Transact(ctx, from, to, amount, balanceCheck)
Expand Down
2 changes: 1 addition & 1 deletion core/services/relay/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (c ChainID) Int64() (int64, error) {
return int64(i), nil
}

// RelayerExt is a subset of [loop.Relayer] for adapting [types.Relayer], typically with a ChainSet. See [relayerAdapter].
// RelayerExt is a subset of [loop.Relayer] for adapting [types.Relayer], typically with a Chain. See [relayerAdapter].
type RelayerExt interface {
types.ChainService
// TODO remove after BFC-2441
Expand Down
2 changes: 1 addition & 1 deletion core/web/resolver/eth_key_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func TestResolver_ETHKeys(t *testing.T) {
},

{
name: "Empty set on #chainSet.Get()",
name: "Empty set on legacy evm chains",
authenticated: true,
before: func(f *gqlTestFramework) {
states := []ethkey.State{
Expand Down

0 comments on commit aa888f1

Please sign in to comment.