/// <summary> /// Adds a new transaction to the list of transactions /// </summary> /// <param name="sender">Address of the Sender</param> /// <param name="recipient">Address of the Recipient</param> /// <param name="amount">Amount</param> public long NewTransaction(string sender, string recipient, decimal amount) { CurrentTransactions.Add(new Transaction() { Sender = sender, Recipient = recipient, Amount = amount }); return(LastBlock().Index + 1); }
/// <summary> /// Creates a new transaction to go into the next mined Block /// </summary> /// <param name="sender"></param> /// <param name="recipient"></param> /// <param name="amout"></param> public int NewTransaction(string sender, string recipient, double amount) { var tran = new Transaction() { Sender = sender, Recipient = recipient, Amount = amount }; CurrentTransactions.Add(tran); return(LastBlock.Index + 1); }
public int NewTransaction(string sender, string recipient, int amount) { CurrentTransactions.Add( new Transaction() { Sender = sender, Recipient = recipient, Amount = amount } ); return(LastBlock.Index + 1); }