mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-04 00:44:27 +00:00
44ad64ffa5
Former-commit-id: 8fbbb08b62c3ca59d5a74ecdc12944c9facc6ad6 [formerly 564ebef7667c7c3e5e2476046027961dbe900e4d] Former-commit-id: ac1af4f69f41c54afc520259285dfb68775be966
29 lines
791 B
Go
29 lines
791 B
Go
package proposer
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/log"
|
|
"github.com/ethereum/go-ethereum/sharding"
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
// 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 {
|
|
node sharding.Node
|
|
}
|
|
|
|
// 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(ctx *cli.Context, node sharding.Node) *Proposer {
|
|
return &Proposer{node}
|
|
}
|
|
|
|
// Start the main entry point for proposing collations.
|
|
func (p *Proposer) Start() error {
|
|
log.Info("Starting proposer client")
|
|
// TODO: Propose collations.
|
|
return nil
|
|
}
|