mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 03:01:19 +00:00
ae1dfbbaf9
Former-commit-id: 2c934014a8624f84a33850a748dc41227f6a64e8 [formerly eebbc1a6350e0895f770c89efee80204cfd63fba] Former-commit-id: 74dca03e825ee2a5af2f8e4bce21c8ae0cae70ee
35 lines
546 B
Go
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
|
|
}
|