mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +00:00
cbfdd4807e
Former-commit-id: 2513b3150392096adf0ac8e43349a1ff046f941c [formerly ddfe2a5c70a4b28c60d4321d87dc4a2a512fdb72] Former-commit-id: 07ffa1c5adf2ab34760d975110d08ddabf2c3d95
32 lines
843 B
Go
32 lines
843 B
Go
package proposer
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/log"
|
|
)
|
|
|
|
// Proposer holds functionality required to run a collation proposer
|
|
// in a sharded system. Must satisfy the Service interface defined in
|
|
// sharding/service.go.
|
|
type Proposer struct{}
|
|
|
|
// NewProposer creates a struct instance. It is initialized and
|
|
// registered as a service upon start of a sharding node.
|
|
// Has access to the public methods of this node.
|
|
func NewProposer() (*Proposer, error) {
|
|
// Initializes a directory persistent db.
|
|
return &Proposer{}, nil
|
|
}
|
|
|
|
// Start the main loop for proposing collations.
|
|
func (p *Proposer) Start() error {
|
|
log.Info("Starting proposer service")
|
|
// TODO: Propose collations.
|
|
return nil
|
|
}
|
|
|
|
// Stop the main loop for proposing collations.
|
|
func (p *Proposer) Stop() error {
|
|
log.Info("Stopping proposer service")
|
|
return nil
|
|
}
|