Beispiel #1
0
        private async Task SendBlockToConsensusAsync(Block block)
        {
            AuthorizingMsg msg = new AuthorizingMsg
            {
                From    = NodeService.Instance.PosWallet.AccountId,
                Block   = block,
                MsgType = ChatMessageType.AuthorizerPrePrepare
            };

            var state = new AuthState(true);

            state.SetView(await GetLastServiceBlockAsync());
            state.InputMsg = msg;

            _sys.Consensus.Tell(state);

            await state.Done.AsTask();

            state.Done.Close();
            state.Done = null;
        }