public void AddTransaction() { var data = HttpContext.GetRequestDataAsync <Model.Transaction>(); if (data != null && data.Result != null) { transactionPool.AddRaw(data.Result); } }
static TransactionPool AddTransactionsToPool(List<Tuple<string,string,double>> listTrx) { string error; var trxPool = new TransactionPool(); foreach (var entry in listTrx) { var trans = new Transaction(entry.Item1, entry.Item2, entry.Item3); if (!trans.SignTransaction(entry.Item1, out error)) Console.WriteLine($"invalid transaction - from:{entry.Item1},to:{entry.Item2},amount{entry.Item3}"); trxPool.AddRaw(trans); } return trxPool; }