コード例 #1
0
 protected override bool FastCheckScriptPubKey(Script scriptPubKey, out bool needMoreCheck)
 {
     needMoreCheck = false;
     return
         (scriptPubKey.Length > 3 &&
          PubKey.SanityCheck(scriptPubKey.ToBytes(true), 1, scriptPubKey.Length - 2) &&
          scriptPubKey.ToBytes(true)[scriptPubKey.Length - 1] == 0xac);
 }
コード例 #2
0
        protected override bool CheckScriptSigCore(Script scriptSig, Op[] scriptSigOps, Script?scriptPubKey, Op[]?scriptPubKeyOps)
        {
            var ops = scriptSigOps;

            if (ops.Length != 2)
            {
                return(false);
            }
            return(ops[0].PushData != null &&
                   ((ops[0].Code == OpcodeType.OP_0) || TransactionSignature.IsValid(ops[0].PushData, ScriptVerify.DerSig)) &&
                   ops[1].PushData != null && PubKey.SanityCheck(ops[1].PushData));
        }
コード例 #3
0
 private bool CheckWitScriptCore(WitScript witScript)
 {
     return(witScript.PushCount == 2 &&
            ((witScript[0].Length == 0) || (TransactionSignature.IsValid(witScript[0], ScriptVerify.None))) &&
            PubKey.SanityCheck(witScript[1]));
 }