Skip to content

Commit

Permalink
Removing global registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduard-Voiculescu committed Oct 18, 2024
1 parent 81ed849 commit 5d807a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion x/evm/tracers/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func init() {
staticFirehoseChainValidationOnInit()

tracers.LiveDirectory.Register("firehose", newFirehoseTracer)
GlobalLiveTracerRegistry.Register("firehose", NewCosmosFirehoseTracer)

// Those 2 are defined but not used in this branch, they are kept because used in other branches
// so it's easier to keep them here and suppress the warning by faking a usage.
Expand Down
8 changes: 0 additions & 8 deletions x/evm/tracers/registry.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package tracers

var GlobalLiveTracerRegistry = NewLiveTracerRegistry()

type LiveTracerRegistry interface {
GetFactoryByID(id string) (BlockchainTracerFactory, bool)
Register(id string, factory BlockchainTracerFactory)
}

var _ LiveTracerRegistry = (*liveTracerRegistry)(nil)

func NewLiveTracerRegistry() LiveTracerRegistry {
return &liveTracerRegistry{
tracers: make(map[string]BlockchainTracerFactory),
}
}

type liveTracerRegistry struct {
tracers map[string]BlockchainTracerFactory
}
Expand Down

0 comments on commit 5d807a1

Please sign in to comment.