prysm-pulse/sharding/proposer/proposer_client.go
Raul Jordan b6ec6d8b23 sharding: update comments across packages for punctuation
Former-commit-id: ab617ef43f369476a4ca863e9ab6f732cec9ed7e [formerly 221795c5c6f43cf0550cdf9ba37345e09e91f47d]
Former-commit-id: 6462269b88180c6f09dc3c633e4104c3cf8efb4d
2018-05-02 20:16:07 -05:00

39 lines
738 B
Go

package proposer
import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/sharding/client"
cli "gopkg.in/urfave/cli.v1"
)
// Proposer holds functionality required to run a collation proposer
// in a sharded system.
type Proposer interface {
Start() error
}
type proposer struct {
client client.Client
}
// NewProposer creates a struct instance.
func NewProposer(ctx *cli.Context) Proposer {
return &proposer{
client: client.NewClient(ctx),
}
}
// Start the main entry point for proposing collations.
func (p *proposer) Start() error {
log.Info("Starting proposer client")
err := p.client.Start()
if err != nil {
return err
}
defer p.client.Close()
// TODO: Propose collations.
return nil
}