protected override bool CheckScriptPubKeyCore(Script scriptPubKey, Op[] scriptPubKeyOps) { var ops = scriptPubKeyOps; if(ops.Length < 1) return false; if(ops[0].Code != OpcodeType.OP_RETURN) return false; if(scriptPubKey.ToBytes(true).Length > MaxScriptSizeLimit) return false; return scriptPubKeyOps.Skip(1).All(o => o.PushData != null && !o.IsInvalid); }
protected override bool CheckScriptPubKeyCore(Script scriptPubKey, Op[] scriptPubKeyOps) { return scriptPubKeyOps.Skip(1).All(o => o.PushData != null && !o.IsInvalid); }
protected override bool CheckScriptSigCore(Script scriptSig, Op[] scriptSigOps, Script scriptPubKey, Op[] scriptPubKeyOps) { if(!scriptSig.IsPushOnly) return false; if(scriptSigOps[0].Code != OpcodeType.OP_0) return false; if(scriptSigOps.Length == 1) return false; if(!scriptSigOps.Skip(1).All(s => TransactionSignature.ValidLength(s.PushData.Length) || s.Code == OpcodeType.OP_0)) return false; if(scriptPubKeyOps != null) { if(!CheckScriptPubKeyCore(scriptPubKey, scriptPubKeyOps)) return false; var sigCountExpected = scriptPubKeyOps[0].GetValue(); return sigCountExpected == scriptSigOps.Length + 1; } return true; }