prysm-pulse/sharding/proposer/proposer_client.go
Preston Van Loon ae1dfbbaf9 Refactor proposer
Former-commit-id: 2c934014a8624f84a33850a748dc41227f6a64e8 [formerly eebbc1a6350e0895f770c89efee80204cfd63fba]
Former-commit-id: 74dca03e825ee2a5af2f8e4bce21c8ae0cae70ee
2018-03-31 17:04:22 -04:00

35 lines
546 B
Go

package proposer
import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/sharding/client"
cli "gopkg.in/urfave/cli.v1"
)
type Proposer interface {
Start() error
}
type proposer struct {
client client.Client
}
func NewProposer(ctx *cli.Context) Proposer {
return &proposer{
client: client.NewClient(ctx),
}
}
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
}