// Check for standard transaction types // @param[in] mapInputs Map of previous transactions that have outputs we're spending // @return True if all inputs (scriptSigs) use only standard transaction forms private bool AreInputsStandard(Transaction tx, MempoolCoinView mapInputs) { if (tx.IsCoinBase) { return(true); // Coinbases don't use vin normally } foreach (TxIn txin in tx.Inputs) { var prev = mapInputs.GetOutputFor(txin); var template = StandardScripts.GetTemplateFromScriptPubKey(prev.ScriptPubKey); if (template == null) { return(false); } if (template.Type == TxOutType.TX_SCRIPTHASH) { if (prev.ScriptPubKey.GetSigOpCount(true) > 15) //MAX_P2SH_SIGOPS { return(false); } } } return(true); }
private bool IsWitnessStandard(Transaction tx, MempoolCoinView mapInputs) { // TODO: Implement Witness Code return(true); }