Esempio n. 1
0
        public ResultWrapper <TransactionForRpc[]> eth_pendingTransactions()
        {
            var transactions       = _blockchainBridge.GetPendingTransactions();
            var transactionsModels = new TransactionForRpc[transactions.Length];

            for (int i = 0; i < transactions.Length; i++)
            {
                var transaction = transactions[i];
                RecoverTxSenderIfNeeded(transaction, null);
                transactionsModels[i] = new TransactionForRpc(transaction);
            }

            if (_logger.IsTrace)
            {
                _logger.Trace($"eth_pendingTransactions request, result: {transactionsModels.Length}");
            }
            return(ResultWrapper <TransactionForRpc[]> .Success(transactionsModels));
        }