Skip to content

Commit

Permalink
give more accurate names to methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie committed Jul 3, 2024
1 parent 04aaca1 commit b52654f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions zetaclient/orchestrator/chain_activate.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func (oc *Orchestrator) ActivateAndDeactivateChains() {
newObserverMap := make(map[int64]interfaces.ChainObserver)

// create new signers and observers
oc.CreateObserversEVM(newSignerMap, newObserverMap)
oc.CreateObserversBTC(newSignerMap, newObserverMap)
oc.CreateSignerObserverEVM(newSignerMap, newObserverMap)
oc.CreateSignerObserverBTC(newSignerMap, newObserverMap)

// activate newly supported chains and deactivate chains that are no longer supported
oc.DeactivateChains(newObserverMap)
Expand Down Expand Up @@ -113,8 +113,8 @@ func (oc *Orchestrator) ActivateChains(
}
}

// CreateObserversEVM creates signer and observer maps for all enabled EVM chains
func (oc *Orchestrator) CreateObserversEVM(
// CreateSignerObserverEVM creates signer and observer maps for all enabled EVM chains
func (oc *Orchestrator) CreateSignerObserverEVM(
resultSignerMap map[int64]interfaces.ChainSigner,
resultObserverMap map[int64]interfaces.ChainObserver,
) {
Expand Down Expand Up @@ -181,8 +181,8 @@ func (oc *Orchestrator) CreateObserversEVM(
}
}

// CreateObserversBTC creates signer and observer maps for all enabled BTC chains
func (oc *Orchestrator) CreateObserversBTC(
// CreateSignerObserverBTC creates signer and observer maps for all enabled BTC chains
func (oc *Orchestrator) CreateSignerObserverBTC(
resultSignerMap map[int64]interfaces.ChainSigner,
resultObserverMap map[int64]interfaces.ChainObserver,
) {
Expand Down
14 changes: 7 additions & 7 deletions zetaclient/orchestrator/chain_activate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func Test_ActivateChains(t *testing.T) {
// create new signer and observer maps
newSignerMap := make(map[int64]interfaces.ChainSigner)
newObserverMap := make(map[int64]interfaces.ChainObserver)
oc.CreateObserversEVM(newSignerMap, newObserverMap)
oc.CreateSignerObserverEVM(newSignerMap, newObserverMap)

// activate chains
oc.ActivateChains(newSignerMap, newObserverMap)
Expand Down Expand Up @@ -187,7 +187,7 @@ func Test_DeactivateChains(t *testing.T) {
// create new signer and observer maps
newSignerMap := make(map[int64]interfaces.ChainSigner)
newObserverMap := make(map[int64]interfaces.ChainObserver)
oc.CreateObserversEVM(newSignerMap, newObserverMap)
oc.CreateSignerObserverEVM(newSignerMap, newObserverMap)

// activate chains
oc.ActivateChains(newSignerMap, newObserverMap)
Expand All @@ -205,7 +205,7 @@ func Test_DeactivateChains(t *testing.T) {
// create maps again based on newly updated config
newSignerMap = make(map[int64]interfaces.ChainSigner)
newObserverMap = make(map[int64]interfaces.ChainObserver)
oc.CreateObserversEVM(newSignerMap, newObserverMap)
oc.CreateSignerObserverEVM(newSignerMap, newObserverMap)

// deactivate chains
oc.DeactivateChains(newObserverMap)
Expand All @@ -221,7 +221,7 @@ func Test_DeactivateChains(t *testing.T) {
}
}

func Test_CreateObserversEVM(t *testing.T) {
func Test_CreateSignerObserverEVM(t *testing.T) {
// define test chains and chain params
evmChain := chains.Ethereum
btcChain := chains.BitcoinMainnet
Expand Down Expand Up @@ -292,7 +292,7 @@ func Test_CreateObserversEVM(t *testing.T) {
// create observers
signerMap := make(map[int64]interfaces.ChainSigner)
observerMap := make(map[int64]interfaces.ChainObserver)
oc.CreateObserversEVM(signerMap, observerMap)
oc.CreateSignerObserverEVM(signerMap, observerMap)

// assert signer/observer map
require.Len(t, signerMap, tt.numObserverCreated)
Expand All @@ -307,7 +307,7 @@ func Test_CreateObserversEVM(t *testing.T) {
}
}

func Test_CreateObserversBTC(t *testing.T) {
func Test_CreateSignerObserverBTC(t *testing.T) {
// define test chains and chain params
evmChain := chains.Ethereum
btcChain := chains.BitcoinMainnet
Expand Down Expand Up @@ -373,7 +373,7 @@ func Test_CreateObserversBTC(t *testing.T) {
// create observers
signerMap := make(map[int64]interfaces.ChainSigner)
observerMap := make(map[int64]interfaces.ChainObserver)
oc.CreateObserversBTC(signerMap, observerMap)
oc.CreateSignerObserverBTC(signerMap, observerMap)

// assert signer/observer map
require.Len(t, signerMap, tt.numObserverCreated)
Expand Down

0 comments on commit b52654f

Please sign in to comment.