Пример #1
0
        public LyraSystem()
        {
            LocalNode     = ActorSystem.ActorOf(Neo.Network.P2P.LocalNode.Props(this));
            TheBlockchain = ActorSystem.ActorOf(BlockChain.Props(this));

            NetworkId = Neo.Settings.Default.LyraNode.Lyra.NetworkId;
            Singleton = this;
        }
Пример #2
0
        public DagSystem()
        {
            _log = new SimpleLogger("DagSystem").Logger;

            LocalNode     = ActorSystem.ActorOf(Neo.Network.P2P.LocalNode.Props(this));
            TheBlockchain = ActorSystem.ActorOf(BlockChain.Props(this));
            TaskManager   = ActorSystem.ActorOf(Neo.Network.P2P.TaskManager.Props(this));

            NetworkId = Neo.Settings.Default.LyraNode.Lyra.NetworkId;
            Singleton = this;
        }
Пример #3
0
        public DagSystem(IHostEnv hostEnv, IAccountCollectionAsync store, IHubContext <LyraEventHub, ILyraEvent> hub, Wallet posWallet, IActorRef localNode)
        {
            _hostEnv    = hostEnv;
            _log        = new SimpleLogger("DagSystem").Logger;
            FullStarted = false;
            _hub        = hub;

            Storage   = new TracedStorage(store);
            PosWallet = posWallet;

            LocalNode = localNode;
            this.LocalNode.Tell(this);

            if (hostEnv != null)     // for unit test
            {
                TheBlockchain = ActorSystem.ActorOf(BlockChain.Props(this, Storage));
                TaskManager   = ActorSystem.ActorOf(Neo.Network.P2P.TaskManager.Props(this));

                //TradeEngine = new TradeMatchEngine(Storage);
            }

            Singleton = this;
        }