prysm-pulse/sharding/collator/collator_client.go
nisdas 394adb4750 Refactor Code
Former-commit-id: ad6a4793064556b556a92dbed3f8a555972c07a1 [formerly 13e903a723eee255b4eb6e2bcc7be06ba73b6fa7]
Former-commit-id: b2ecf21d02170030dfc56e9d9303aeb7bee45fab
2018-03-31 12:07:42 +08:00

28 lines
453 B
Go

package collator
import (
"github.com/ethereum/go-ethereum/sharding/client"
cli "gopkg.in/urfave/cli.v1"
)
func NewCollatorClient(ctx *cli.Context) *client.ShardingClient {
c := client.MakeClient(ctx)
return c
}
func CollatorStart(sclient *client.ShardingClient) error {
sclient.Start()
if err := joinCollatorPool(sclient); err != nil {
return err
}
if err := subscribeBlockHeaders(sclient); err != nil {
return err
}
return nil
}