sharding: fully functional start func in notary service

Former-commit-id: 0755ae70512ad06ee0710f20136883ecacc8cf63 [formerly 7d558c0b4d2dd5302eaf2b8e9f8d51224ffc3858]
Former-commit-id: 3c6b00e5d5e3547260e6e0c1122ef64be08a40c1
This commit is contained in:
Raul Jordan 2018-05-22 07:56:56 -05:00
parent 49dc0dc4a5
commit 3b19aa7c03

View File

@ -22,14 +22,16 @@ func NewNotary(ctx *cli.Context, node node.Node) (*Notary, error) {
func (n *Notary) Start() error {
log.Info("Starting notary service")
// if n.node.DepositFlagSet() {
// if err := joinNotaryPool(n.node); err != nil {
// return err
// }
// }
// TODO: handle this better through goroutines. Right now, these methods
// have their own nested channels and goroutines within them. We need
// to make this as flat as possible at the Notary layer.
if n.node.DepositFlagSet() {
if err := joinNotaryPool(n.node); err != nil {
return err
}
}
// return subscribeBlockHeaders(n.node)
return nil
return subscribeBlockHeaders(n.node)
}
// Stop the main loop for notarizing collations.