From: CryptoManiac Date: Mon, 31 Aug 2015 16:33:37 +0000 (+0300) Subject: Fix serialization issue. X-Git-Url: https://git.novaco.in/?p=NovacoinLibrary.git;a=commitdiff_plain;h=b9ed15dff6232d8f95c1f6becb3ebe8867044305 Fix serialization issue. --- diff --git a/Novacoin/CBlockStore.cs b/Novacoin/CBlockStore.cs index 2c43d65..11190a9 100644 --- a/Novacoin/CBlockStore.cs +++ b/Novacoin/CBlockStore.cs @@ -189,13 +189,13 @@ namespace Novacoin // Seek to the end and then append magic bytes there. writer.Seek(0, SeekOrigin.End); writer.Write(magicBytes, 0, magicBytes.Length); + writer.Write(blkLenBytes, 0, blkLenBytes.Length); // Save block size and current position in the block cursor fields. nBlockPos = writer.Position; nBlockSize = blockBytes.Length; // Write block and flush the stream. - writer.Write(blkLenBytes, 0, blkLenBytes.Length); writer.Write(blockBytes, 0, blockBytes.Length); writer.Flush();