Пример #1
0
 // 根据应用链的Hash,获取应用链的ZoroChain对象
 public bool GetAppSystem(UInt160 chainHash, out ZoroSystem chain)
 {
     return(appSystems.TryGetValue(chainHash, out chain));
 }
Пример #2
0
        // 启动应用链的共识服务
        public void StartAppChainConsensus(string hashString, Wallet wallet)
        {
            UInt160 chainHash = UInt160.Parse(hashString);

            StartConsensus(chainHash, wallet);
        }
Пример #3
0
        public void StopConsensus(UInt160 chainHash)
        {
            IActorRef system = GetChainActor(chainHash);

            system?.Tell(new ZoroSystem.StopConsensus());
        }
Пример #4
0
 // 事件通知函数:根链或者应用链被启动
 public void OnBlockChainStarted(UInt160 chainHash, int port, int wsport)
 {
     eventHandler.OnBlockChainStarted(chainHash, port, wsport);
 }
Пример #5
0
 public IActorRef GetChainActor(UInt160 chainHash)
 {
     chainActors.TryGetValue(chainHash, out IActorRef actor);
     return(actor);
 }