コード例 #1
0
        public async Task IterationCleanup()
        {
            await _txHub.HandleUnexecutableTransactionsFoundAsync(new UnexecutableTransactionsFoundEvent
                                                                  (null, _transactions.Select(t => t.GetHash()).ToList()));

            await _txHub.HandleBestChainFoundAsync(new BestChainFoundEventData
            {
                BlockHash   = _chain.BestChainHash,
                BlockHeight = _chain.BestChainHeight
            });

            await _transactionManager.RemoveTransactionsAsync(_transactions.Select(t => t.GetHash()).ToList());
        }
コード例 #2
0
ファイル: MinerTests.cs プロジェクト: zhxymh/AElf
        public async Task IterationCleanup()
        {
            await _blockStateSets.RemoveAsync(_block.GetHash().ToStorageKey());

            var transactionIds = _transactions.Select(t => t.GetHash()).ToList();
            await _transactionManager.RemoveTransactionsAsync(transactionIds);

            await _transactionResultManager.RemoveTransactionResultsAsync(transactionIds, _block.GetHash());

            await _transactionResultManager.RemoveTransactionResultsAsync(transactionIds,
                                                                          _block.Header.GetPreMiningHash());

            await _txHub.HandleUnexecutableTransactionsFoundAsync(new UnexecutableTransactionsFoundEvent
                                                                  (null, _transactions.Select(t => t.GetHash()).ToList()));

            await _txHub.HandleBestChainFoundAsync(new BestChainFoundEventData
            {
                BlockHash   = _chain.BestChainHash,
                BlockHeight = _chain.BestChainHeight
            });
        }
コード例 #3
0
 public async Task HandleEventAsync(UnexecutableTransactionsFoundEvent eventData)
 {
     await _txHub.HandleUnexecutableTransactionsFoundAsync(eventData);
 }