From: CryptoManiac Date: Sat, 29 Aug 2015 16:49:42 +0000 (+0300) Subject: Hash and CTransaction: remove pre-initialization of properties. X-Git-Url: https://git.novaco.in/?a=commitdiff_plain;h=b8edf2030a6849511ea763b44990978b1dd7bd24;hp=2039e10848db3f133fea8a34413166312f277aa8;p=NovacoinLibrary.git Hash and CTransaction: remove pre-initialization of properties. --- diff --git a/Novacoin/CTransaction.cs b/Novacoin/CTransaction.cs index 733ef53..fd8c28f 100644 --- a/Novacoin/CTransaction.cs +++ b/Novacoin/CTransaction.cs @@ -30,12 +30,12 @@ namespace Novacoin /// /// Version of transaction schema. /// - public uint nVersion = 1; + public uint nVersion; /// /// Transaction timestamp. /// - public uint nTime = 0; + public uint nTime; /// /// Array of transaction inputs @@ -50,7 +50,7 @@ namespace Novacoin /// /// Block height or timestamp when transaction is final /// - public uint nLockTime = 0; + public uint nLockTime; /// /// Initialize an empty instance @@ -60,8 +60,11 @@ namespace Novacoin // Initialize empty input and output arrays. Please note that such // configuration is not valid for real transaction, you have to supply // at least one input and one output. + nVersion = 1; + nTime = 0; vin = new CTxIn[0]; vout = new CTxOut[0]; + nLockTime = 0; } /// diff --git a/Novacoin/Hash.cs b/Novacoin/Hash.cs index 941854f..5b1d3b7 100644 --- a/Novacoin/Hash.cs +++ b/Novacoin/Hash.cs @@ -27,7 +27,7 @@ namespace Novacoin /// /// Array of digest bytes. /// - protected byte[] _hashBytes = null; + protected byte[] _hashBytes; /// /// Hash size, must be overriden