Example #1
0
            public TV2(params string[] args)
            {
                sig   = args[0];
                pub   = args[1];
                flags = args[2];
                error = args[3];

                scriptSig   = ScriptBuilder.ParseTestScript(sig).ToScript();
                scriptPub   = ScriptBuilder.ParseTestScript(pub).ToScript();
                scriptFlags = ScriptInterpreter.ParseFlags(flags);
                scriptError = ToScriptError(error);

                opcodes = scriptSig.Decode().Select(o => o.Code)
                          .Concat(scriptPub.Decode().Select(o => o.Code))
                          .Distinct()
                          .OrderBy(o => o).ToArray();

                keyopcode = opcodes.Length == 0 ? (Opcode?)null : opcodes.Last();
            }