public void SerializeTest() { var scr = new MockSerializableSigScript(new byte[1] { 255 }, 2); TxIn tx = new TxIn(Helper.GetBytes(32), 1, scr, 953132143); FastStream stream = new FastStream(); tx.Serialize(stream); byte[] actual = stream.ToByteArray(); byte[] expected = new byte[32 + 4 + 2 + 4]; Buffer.BlockCopy(Helper.GetBytes(32), 0, expected, 0, 32); expected[32] = 1; expected[36] = 2; expected[37] = 255; expected[38] = 0x6f; expected[39] = 0xa4; expected[40] = 0xcf; expected[41] = 0x38; Assert.Equal(expected, actual); }