public async Task <ActionResult> Transactions(int limit = 100) { Stopwatch sw = new Stopwatch(); sw.Start(); Parallel.ForEach(Enumerable.Repeat(1, limit), async(x) => { try { int secret = new CRNGRandom().NextInt(); var tx1 = await CreateTransaction(secret, Sp8deTransactionType.AggregatedCommit); var tx2 = await CreateTransaction(secret, Sp8deTransactionType.AggregatedReveal, tx1.Id); } catch (Exception e) { } }); sw.Stop(); return(Ok(sw.ElapsedMilliseconds)); }
public void Test() { var rnd = new CRNGRandom(); var data = rnd.NextLong(); }