Esempio n. 1
0
 protected internal override void OnStart()
 {
     Blockchain.RegisterBlockchain(new LevelDBBlockchain());
     Blockchain.Default.PersistCompleted += Blockchain_PersistCompleted;
     localnode = new LocalNode();
     localnode.Start();
 }
Esempio n. 2
0
 protected internal override void OnStart(string[] args)
 {
     Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.DataDirectoryPath));
     LocalNode = new LocalNode();
     LocalNode.Start();
     if (args.Length >= 1 && args[0] == "/rpc")
     {
         rpc = new RpcServer();
         rpc.Start();
     }
 }
Esempio n. 3
0
 public static void Main()
 {
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     if (!CheckVersion()) return;
     using (Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.DataDirectoryPath)))
     using (LocalNode = new LocalNode())
     {
         LocalNode.UpnpEnabled = true;
         Application.Run(MainForm = new MainForm());
     }
 }
Esempio n. 4
0
 internal RemoteNode(LocalNode localNode, Socket socket)
     : this(localNode)
 {
     this.socket = socket;
     OnConnected();
 }
Esempio n. 5
0
 internal RemoteNode(LocalNode localNode, IPEndPoint remoteEndpoint)
     : this(localNode)
 {
     this.socket           = new Socket(remoteEndpoint.Address.IsIPv4MappedToIPv6 ? AddressFamily.InterNetwork : remoteEndpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
     this.ListenerEndpoint = remoteEndpoint;
 }
Esempio n. 6
0
 private void OnMemPoolMessageReceived()
 {
     EnqueueMessage("inv", InvPayload.Create(InventoryType.TX, LocalNode.GetMemoryPool().Select(p => p.Hash).ToArray()));
 }
Esempio n. 7
0
 internal RemoteNode(LocalNode localNode, TcpClient tcp)
     : this(localNode)
 {
     this.tcp = tcp;
     OnConnected();
 }
Esempio n. 8
0
 internal RemoteNode(LocalNode localNode, IPEndPoint remoteEndpoint)
     : this(localNode)
 {
     this.tcp = new TcpClient(remoteEndpoint.Address.IsIPv4MappedToIPv6 ? AddressFamily.InterNetwork : remoteEndpoint.AddressFamily);
     this.ListenerEndpoint = remoteEndpoint;
 }
Esempio n. 9
0
 internal RemoteNode(LocalNode localNode, TcpClient tcp)
 {
     this.localNode = localNode;
     this.tcp = tcp;
     connected = true;
 }
Esempio n. 10
0
 internal RemoteNode(LocalNode localNode, TcpClient tcp)
 {
     this.localNode = localNode;
     this.tcp = tcp;
     OnConnected();
 }
Esempio n. 11
0
 protected RemoteNode(LocalNode localNode)
 {
     this.localNode = localNode;
 }
Esempio n. 12
0
 public TcpRemoteNode(LocalNode localNode, Socket socket)
     : base(localNode)
 {
     this.socket = socket;
     OnConnected();
 }
Esempio n. 13
0
 internal RemoteNode(LocalNode localNode, TcpClient tcp)
     : this(localNode)
 {
     this.tcp = tcp;
     OnConnected();
 }
Esempio n. 14
0
 private RemoteNode(LocalNode localNode)
 {
     this.localNode = localNode;
     this.protocolThread = new Thread(RunProtocol) { IsBackground = true };
     this.sendThread = new Thread(SendLoop) { IsBackground = true };
 }
Esempio n. 15
0
 static Program()
 {
     Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.DataDirectoryPath));
     LocalNode = new LocalNode(Settings.Default.NodePort);
 }
Esempio n. 16
0
 internal RemoteNode(LocalNode localNode, IPEndPoint remoteEndpoint)
 {
     this.localNode = localNode;
     this.tcp = new TcpClient();
     this.RemoteEndpoint = remoteEndpoint;
 }
Esempio n. 17
0
 internal RemoteNode(LocalNode localNode, IPEndPoint remoteEndpoint)
 {
     this.localNode = localNode;
     this.tcp = new TcpClient(remoteEndpoint.Address.IsIPv4MappedToIPv6 ? AddressFamily.InterNetwork : remoteEndpoint.AddressFamily);
     this.RemoteEndpoint = remoteEndpoint;
 }
Esempio n. 18
0
 protected internal override void OnStart()
 {
     Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.DataDirectoryPath));
     localnode = new LocalNode();
     localnode.Start();
     StartMine(source.Token);
 }
Esempio n. 19
0
 protected internal override void OnStart()
 {
     Blockchain.RegisterBlockchain(new LevelDBBlockchain(Settings.Default.DataDirectoryPath));
     Blockchain.Default.PersistCompleted += Blockchain_PersistCompleted;
     LocalNode.NewInventory += LocalNode_NewInventory;
     localnode = new LocalNode();
     localnode.Start();
 }