mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 19:21:19 +00:00
a363175bbc
Former-commit-id: af2dcc65c4c3891a67d4dcf06946537a94901a0a [formerly fe1c017c119100b522a5edcf674f11a8edab9eca] Former-commit-id: e4dbbeb226d9ead45c244717f56deae2edd29bf1
33 lines
881 B
Go
33 lines
881 B
Go
// Package observer launches a service attached to the sharding node
|
|
// that simply observes activity across the sharded Ethereum network.
|
|
package observer
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/log"
|
|
"github.com/ethereum/go-ethereum/sharding/node"
|
|
)
|
|
|
|
// Observer holds functionality required to run an observer service
|
|
// in a sharded system. Must satisfy the Service interface defined in
|
|
// sharding/service.go.
|
|
type Observer struct {
|
|
node node.Node
|
|
}
|
|
|
|
// NewObserver creates a new observer instance.
|
|
func NewObserver(node node.Node) (*Observer, error) {
|
|
return &Observer{node}, nil
|
|
}
|
|
|
|
// Start the main routine for an observer.
|
|
func (o *Observer) Start() error {
|
|
log.Info("Starting shard observer service")
|
|
return nil
|
|
}
|
|
|
|
// Stop the main loop for observing the shard network.
|
|
func (o *Observer) Stop() error {
|
|
log.Info("Stopping shard observer service")
|
|
return nil
|
|
}
|