|
|
@ -26,7 +26,7 @@ func (node *Node) setupForShardLeader() { |
|
|
|
node.serviceManager.RegisterService(service.NetworkInfo, networkinfo.New(node.host, node.NodeConfig.GetShardGroupID(), chanPeer, nil)) |
|
|
|
node.serviceManager.RegisterService(service.NetworkInfo, networkinfo.New(node.host, node.NodeConfig.GetShardGroupID(), chanPeer, nil)) |
|
|
|
|
|
|
|
|
|
|
|
// Register explorer service.
|
|
|
|
// Register explorer service.
|
|
|
|
node.serviceManager.RegisterService(service.SupportExplorer, explorer.New(&node.SelfPeer, node.Consensus.GetNodeIDs)) |
|
|
|
node.serviceManager.RegisterService(service.SupportExplorer, explorer.New(&node.SelfPeer, node.Consensus.GetNodeIDs, node.GetBalanceOfAddress)) |
|
|
|
// Register consensus service.
|
|
|
|
// Register consensus service.
|
|
|
|
node.serviceManager.RegisterService(service.Consensus, consensus.New(node.BlockChannel, node.Consensus, node.startConsensus)) |
|
|
|
node.serviceManager.RegisterService(service.Consensus, consensus.New(node.BlockChannel, node.Consensus, node.startConsensus)) |
|
|
|
// Register new block service.
|
|
|
|
// Register new block service.
|
|
|
@ -68,7 +68,7 @@ func (node *Node) setupForBeaconLeader() { |
|
|
|
// Register randomness service
|
|
|
|
// Register randomness service
|
|
|
|
node.serviceManager.RegisterService(service.Randomness, randomness.New(node.DRand)) |
|
|
|
node.serviceManager.RegisterService(service.Randomness, randomness.New(node.DRand)) |
|
|
|
// Register explorer service.
|
|
|
|
// Register explorer service.
|
|
|
|
node.serviceManager.RegisterService(service.SupportExplorer, explorer.New(&node.SelfPeer, node.Consensus.GetNodeIDs)) |
|
|
|
node.serviceManager.RegisterService(service.SupportExplorer, explorer.New(&node.SelfPeer, node.Consensus.GetNodeIDs, node.GetBalanceOfAddress)) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (node *Node) setupForBeaconValidator() { |
|
|
|
func (node *Node) setupForBeaconValidator() { |
|
|
|