mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 10:41:19 +00:00
44ad64ffa5
Former-commit-id: 8fbbb08b62c3ca59d5a74ecdc12944c9facc6ad6 [formerly 564ebef7667c7c3e5e2476046027961dbe900e4d] Former-commit-id: ac1af4f69f41c54afc520259285dfb68775be966
39 lines
860 B
Go
39 lines
860 B
Go
package notary
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/log"
|
|
"github.com/ethereum/go-ethereum/sharding"
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
// Notary holds functionality required to run a collation notary
|
|
// in a sharded system. Must satisfy the Service interface defined in
|
|
// sharding/service.go.
|
|
type Notary struct {
|
|
node sharding.Node
|
|
}
|
|
|
|
// NewNotary creates a new notary instance.
|
|
func NewNotary(ctx *cli.Context, node sharding.Node) *Notary {
|
|
return &Notary{node}
|
|
}
|
|
|
|
// Start the main routine for a notary.
|
|
func (n *Notary) Start() error {
|
|
log.Info("Starting notary client")
|
|
// err := c.client.Start()
|
|
// if err != nil {
|
|
// return err
|
|
// }
|
|
// defer c.client.Close()
|
|
|
|
// if c.client.DepositFlagSet() {
|
|
// if err := joinNotaryPool(c.client); err != nil {
|
|
// return err
|
|
// }
|
|
// }
|
|
|
|
// return subscribeBlockHeaders(c.client)
|
|
return nil
|
|
}
|