Esempio n. 1
0
        public virtual async Task ProcessTransactionAsync(string transactionHash, BlockWithTransactionHashes block)
        {
            var transactionSource = await GetTransaction(transactionHash).ConfigureAwait(false);

            var transactionReceipt = await GetTransactionReceipt(transactionHash).ConfigureAwait(false);

            if (_contractCreationTransactionProcessor.IsTransactionForContractCreation(transactionSource, transactionReceipt))
            {
                if (EnabledContractCreationProcessing)
                {
                    await
                    _contractCreationTransactionProcessor.ProcessTransactionAsync(transactionSource, transactionReceipt,
                                                                                  block.Timestamp).ConfigureAwait(false);
                }
            }
            else
            {
                if (await _contractTransactionProcessor.IsTransactionForContractAsync(transactionSource))
                {
                    if (EnabledContractProcessing)
                    {
                        await
                        _contractTransactionProcessor.ProcessTransactionAsync(transactionSource, transactionReceipt,
                                                                              block.Timestamp).ConfigureAwait(false);
                    }
                }
                else if (EnabledValueProcessing)
                {
                    await
                    _valueTransactionProcessor.ProcessTransactionAsync(transactionSource, transactionReceipt,
                                                                       block.Timestamp).ConfigureAwait(false);
                }
            }
        }
Esempio n. 2
0
        private async Task ProcessContractCreation(Block block, Transaction transactionSource, TransactionReceipt transactionReceipt)
        {
            if (!EnabledContractCreationProcessing)
            {
                return;
            }

            await
            _contractCreationTransactionProcessor.ProcessTransactionAsync(
                transactionSource, transactionReceipt, block.Timestamp)
            .ConfigureAwait(false);
        }