Example #1
0
        public EndpointNode()
        {
            rpcServer = new RpcServer(this, 9916);

            chain  = new ChainState();
            wallet = new Wallet(chain);
            txPool = new TransactionPool();

            Subscribe <PktBroadcastNewBlock>(OnNewBlock);
            Subscribe <PktNewTransaction>(OnNewTransaction);
            Subscribe <PktRequestPeers>(OnRequestPeers);
            Subscribe <PktResponsePeers>(OnResponsePeers);

            discoverThread = new Thread(DiscoverWorker);
            discoverThread.Start();
        }
Example #2
0
 public RpcSession(RpcServer _server)
 {
     server = _server;
 }