X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=Novacoin%2FCTxOut.cs;h=3e3d4c18bf4fd0c5c299da3ee595afb67408e9f1;hb=12a559c6cb61ae1c22e2859742ea0edd552eca07;hp=920fcd5f95f6b341067d8184c345d73c5d724874;hpb=9558aa4b58373db5fb7ba81f1449d05b0be08fa1;p=NovacoinLibrary.git diff --git a/Novacoin/CTxOut.cs b/Novacoin/CTxOut.cs index 920fcd5..3e3d4c1 100644 --- a/Novacoin/CTxOut.cs +++ b/Novacoin/CTxOut.cs @@ -12,7 +12,7 @@ namespace Novacoin /// /// Input value. /// - public ulong nValue; + public long nValue = -1; /// /// Second half of script which contains spending instructions. @@ -81,6 +81,28 @@ namespace Novacoin } } + public void SetNull() + { + nValue = -1; + scriptPubKey.SetNullDestination(); + } + + public void SetEmpty() + { + nValue = 0; + scriptPubKey.SetNullDestination(); + } + + public bool IsNull + { + get { return (nValue == -1); } + } + + public bool IsEmpty + { + get { return nValue == 0 && scriptPubKey.IsNull; } + } + public override string ToString () { StringBuilder sb = new StringBuilder ();