From 9e5d3f30b0d7c34301912a99ce508512081d1aa0 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Mon, 24 Aug 2015 07:40:34 +0300 Subject: [PATCH] CODESEPARATOR workaround --- Novacoin/ScriptCode.cs | 2 +- NovacoinTest/Program.cs | 2 -- 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/Novacoin/ScriptCode.cs b/Novacoin/ScriptCode.cs index 43cf9d4..eb5f4dc 100644 --- a/Novacoin/ScriptCode.cs +++ b/Novacoin/ScriptCode.cs @@ -685,7 +685,7 @@ namespace Novacoin // In case concatenating two scripts ends up with two codeseparators, // or an extra one at the end, this prevents all those possible incompatibilities. - script.RemovePattern(new byte[] { (byte)instruction.OP_CODESEPARATOR }); + //script.RemovePattern(new byte[] { (byte)instruction.OP_CODESEPARATOR }); // TODO: issue here, due to false matches this breaks the validation of some scripts // Blank out other inputs' signatures for (int i = 0; i < txTmp.vin.Length; i++) diff --git a/NovacoinTest/Program.cs b/NovacoinTest/Program.cs index 9dbb5c5..0fc0176 100644 --- a/NovacoinTest/Program.cs +++ b/NovacoinTest/Program.cs @@ -207,8 +207,6 @@ namespace NovacoinTest Console.WriteLine("--- Pay-to-ScriptHash test ---"); - // TODO: this test doesn't pass correctly, something wrong here. - var txFrom = new CTransaction(Interop.HexToArray("010000009c2011520173dc34b7fba54bcc9bd6e08e5b112fa69320879b7e43cb4f4f1992a14571a43c140000006a473044022031966a63cbf90d4f8aea72c14a4d6762446b4985963f537ca5c3ddf5a110a7d702205e49f2fee16a4cf8da1ab26ddd819fb127d00b63409878a989b3b86d41d88e250121023842ed96bb829f62559dca2c94fbd146e76597695f3f967cb789216c7fa5adc3ffffffff02ec36f910000000001976a9140fa4d848a8faa1097a3f186ce5edcaed5ee260ee88ac20a107000000000017a91482cc61dbc6840b36e8ed42c6e9c16425a3bad3508700000000")); var txToP2SH = new CTransaction(Interop.HexToArray("010000004c23115201d33e0feda63734135abcae51dd91a7d905b335ba0da1ac02cc02680c2d33096501000000dc00493046022100d449e5c7bd81db06f47546538b18d92092b0cb0210f549022db3880d569ab34202210083f7f93ed9f30c44bfb19541c4cccfb54e1c7004611417f9cb785e0def1a6ff90148304502207c44b870abfb35f58cbe48283010417d009101100bd18ba491b9c9783b822eb40221009aa4d966b7ef6dec66cc56f53fc352b087761bd1807b05c01897a74697cb31f9014752210205be3a707f5ff2a547a00466b729454ef052c3e83029f21f39d1052e1441ac74210373c1aee17cfd9fda5df7179a105236c18ab79fab8050ebc312fc95d580c209d452aeffffffff01107a0700000000001976a91420d9eab07eb7d1a0b610166009194a8d3d6eb2fd88ac00000000")); -- 1.7.1