// Start implements node.Service, starting all internal goroutines needed by the
// Matrix protocol implementation.
Start implements node.Service, starting all internal goroutines needed by the
Matrix protocol implementation.
// Start implements node . Service starting all internal goroutines needed by the // Matrix protocol implementation .
func (s *Matrix) Start(srvr *p2p.Server) error {
	srvr.NetWorkId = s.config.NetworkId
	s.startBloomHandlers()
	s.netRPCService = manapi.NewPublicNetAPI(srvr, s.NetVersion())
	maxPeers := srvr.MaxPeers
	if s.config.LightServ > 0 {
		if s.config.LightPeers >= srvr.MaxPeers {
			return fmt.Errorf("invalid peer config: light peer count (%d) >= total peer count (%d)", s.config.LightPeers, srvr.MaxPeers)
		}
		maxPeers -= s.config.LightPeers
	}
	s.protocolManager.Start(maxPeers)
	if s.lesServer != nil {
		s.lesServer.Start(srvr)
	}
	return nil
}
func ( s * Matrix ) Start ( srvr * p2p . Server ) error { srvr . NetWorkId = s . config . NetworkId s . startBloomHandlers ( ) s . netRPCService = manapi . NewPublicNetAPI ( srvr , s . NetVersion ( ) ) maxPeers := srvr . MaxPeers if s . config . LightServ > 0 { if s . config . LightPeers >= srvr . MaxPeers { return fmt . Errorf ( " " , s . config . LightPeers , srvr . MaxPeers ) } maxPeers -= s . config . LightPeers } s . protocolManager . Start ( maxPeers ) if s . lesServer != nil { s . lesServer . Start ( srvr ) } return nil }
Start implements node.Service, starting all internal goroutines needed by the
Matrix protocol implementation.
Start implements node . Service starting all internal goroutines needed by the Matrix protocol implementation .
// Start the bloom bits servicing goroutines // Start the RPC service // Figure out a max peers count based on the server limits // Start the networking layer and the light server if requested //s.broadTx.Start()//