From 09854c5efa6c37b30388cbcf7f888652637f9ac9 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sun, 30 Aug 2015 08:24:01 +0300 Subject: [PATCH] Use ulong type for output value. --- Novacoin/CTxOut.cs | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Novacoin/CTxOut.cs b/Novacoin/CTxOut.cs index ceea2a4..3f63423 100644 --- a/Novacoin/CTxOut.cs +++ b/Novacoin/CTxOut.cs @@ -30,7 +30,7 @@ namespace Novacoin /// /// Input value. /// - public long nValue = -1; + public ulong nValue = ulong.MaxValue; /// /// Second half of script which contains spending instructions. @@ -69,7 +69,7 @@ namespace Novacoin { // Fill outputs array vout[nIndex] = new CTxOut(); - vout[nIndex].nValue = BitConverter.ToUInt32(wBytes.Get(8), 0); + vout[nIndex].nValue = BitConverter.ToUInt64(wBytes.Get(8), 0); int nScriptPKLen = (int)wBytes.GetVarInt(); vout[nIndex].scriptPubKey = new CScript(wBytes.Get(nScriptPKLen)); @@ -100,7 +100,7 @@ namespace Novacoin /// public void SetNull() { - nValue = -1; + nValue = ulong.MaxValue; scriptPubKey = new CScript(); } @@ -115,7 +115,7 @@ namespace Novacoin public bool IsNull { - get { return (nValue == -1); } + get { return (nValue == ulong.MaxValue); } } public bool IsEmpty -- 1.7.1