Initialization cleanup
authorCryptoManiac <balthazar@yandex.ru>
Fri, 21 Aug 2015 17:09:42 +0000 (20:09 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Fri, 21 Aug 2015 17:09:42 +0000 (20:09 +0300)
Novacoin/CBlockHeader.cs

index 8c07cf2..1c346e6 100644 (file)
@@ -60,8 +60,8 @@ namespace Novacoin
         public CBlockHeader(byte[] bytes)
         {
             nVersion = BitConverter.ToUInt32(bytes, 0);
-            prevHash = new Hash256(bytes.Skip(4).Take(32).ToArray());
-            merkleRoot = new Hash256(bytes.Skip(36).Take(32).ToArray());
+            prevHash = new Hash256(bytes, 4);
+            merkleRoot = new Hash256(bytes, 36);
             nTime = BitConverter.ToUInt32(bytes, 68);
             nBits = BitConverter.ToUInt32(bytes, 72);
             nNonce = BitConverter.ToUInt32(bytes, 76);