prysm-pulse/sharding/proposer/proposer_client.go
Raul Jordan 701a33caec sharding: fix exported type warnings by adding corresponding comments. Cleaned up comment formatting across our packages
Former-commit-id: 74b60e1bdacfa4889a4b7a36e22698e7bc8a6084 [formerly 6f5d01b919d58ebffa7d5c1d197d2236c2f906f7]
Former-commit-id: 3ad090ec4170cc2bc901caae17f1eb4895af2c42
2018-05-02 10:37:44 -05:00

39 lines
734 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
}