コード例 #1
0
        private async Task HandleConsensusRequestMiningEventAsync(
            ConsensusRequestMiningEventData consensusRequestMiningEventData)
        {
            await _consensusRequestMiningEventHandler.HandleEventAsync(consensusRequestMiningEventData);

            await Task.Delay(500);
        }
コード例 #2
0
        public async Task HandleEventAsync_Test()
        {
            var chain = await _chainService.GetChainAsync();

            var hash      = chain.BestChainHash;
            var height    = chain.BestChainHeight;
            var eventData =
                new ConsensusRequestMiningEventData(hash, height, TimestampHelper.GetUtcNow(),
                                                    TimestampHelper.DurationFromSeconds(60), TimestampHelper.GetUtcNow().AddDays(1));

            await _miningEventHandler.HandleEventAsync(eventData);
        }