Example #1
0
 public void StartNode(int port = 0, int ws_port = 0)
 {
     LocalNode.Tell(new Peer.Start
     {
         Port   = port,
         WsPort = ws_port
     });
 }
Example #2
0
 internal void ResumeNodeStartup()
 {
     suspend = false;
     if (start_message != null)
     {
         LocalNode.Tell(start_message);
         start_message = null;
     }
 }
Example #3
0
        public void StartNode(ChannelsConfig config)
        {
            start_message = config;

            if (!suspend)
            {
                LocalNode.Tell(start_message);
                start_message = null;
            }
        }
Example #4
0
 public void StartNode(int port           = 0, int wsPort = 0, int minDesiredConnections = Peer.DefaultMinDesiredConnections,
                       int maxConnections = Peer.DefaultMaxConnections)
 {
     LocalNode.Tell(new Peer.Start
     {
         Port   = port,
         WsPort = wsPort,
         MinDesiredConnections = minDesiredConnections,
         MaxConnections        = maxConnections
     });
 }
Example #5
0
 public bool ResumeNodeStartup()
 {
     if (Interlocked.Decrement(ref suspend) != 0)
     {
         return(false);
     }
     if (start_message != null)
     {
         LocalNode.Tell(start_message);
         start_message = null;
     }
     return(true);
 }
Example #6
0
 public void StartNode(int port           = 0, int wsPort = 0, int minDesiredConnections = Peer.DefaultMinDesiredConnections,
                       int maxConnections = Peer.DefaultMaxConnections)
 {
     start_message = new Peer.Start
     {
         Port   = port,
         WsPort = wsPort,
         MinDesiredConnections = minDesiredConnections,
         MaxConnections        = maxConnections
     };
     if (!suspend)
     {
         LocalNode.Tell(start_message);
         start_message = null;
     }
 }
Example #7
0
        private void StartNode(int port, int wsPort, int minDesiredConnections, int maxConnections, int maxConnectionsPerAddress)
        {
            LocalNode.Tell(new Peer.Start
            {
                Port   = port,
                WsPort = wsPort,
                MinDesiredConnections    = minDesiredConnections,
                MaxConnections           = maxConnections,
                MaxConnectionsPerAddress = maxConnectionsPerAddress
            });

            // 向插件发送消息通知
            PluginManager.Singleton.SendMessage(new ChainStarted
            {
                ChainHash = ChainHash,
                Port      = port,
                WsPort    = wsPort,
            });

            // 向应用链管理器发送事件通知
            ZoroChainSystem.Singleton.OnBlockChainStarted(ChainHash, port, wsPort);
        }