Skip to content

Commit

Permalink
Implement observer map sync based on chainParams
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Jul 19, 2024
1 parent 1d5206b commit f71991c
Show file tree
Hide file tree
Showing 5 changed files with 407 additions and 198 deletions.
2 changes: 1 addition & 1 deletion zetaclient/chains/base/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (ob *Observer) Start() bool {

// Stop notifies all goroutines to stop and closes the database.
func (ob *Observer) Stop() {
ob.logger.Chain.Info().Msgf("observer is stopping for chain %d", ob.Chain().ChainId)
ob.logger.Chain.Info().Msgf("Stopping observer for chain %d", ob.Chain().ChainId)
close(ob.stop)

ob.mu.Lock()
Expand Down
3 changes: 0 additions & 3 deletions zetaclient/chains/bitcoin/observer/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ func (ob *Observer) GetChainParams() observertypes.ChainParams {

// Start starts the Go routine processes to observe the Bitcoin chain
func (ob *Observer) Start(ctx context.Context) {
ob.Mu().Lock()
defer ob.Mu().Unlock()

if noop := ob.Observer.Start(); noop {
ob.Logger().Chain.Info().Msgf("observer is already started for chain %d", ob.Chain().ChainId)
return
Expand Down
Loading

0 comments on commit f71991c

Please sign in to comment.