using System.Text;
using System.Collections.Generic;
using System.IO;
+using System.Diagnostics.Contracts;
namespace Novacoin
{
}
/// <summary>
+ /// Amount of novacoins spent by this transaction.
+ /// </summary>
+ public ulong ValueOut
+ {
+ get
+ {
+ ulong nValueOut = 0;
+ foreach (var txout in vout)
+ {
+ nValueOut += txout.nValue;
+ Contract.Assert(MoneyRange(txout.nValue) && MoneyRange(nValueOut));
+ }
+ return nValueOut;
+ }
+ }
+
+ /// <summary>
/// A sequence of bytes, which corresponds to the current state of CTransaction.
/// </summary>
public static implicit operator byte[] (CTransaction tx)