mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
allow any number of op return outputs in a transaction
This commit is contained in:
parent
d207f2754b
commit
904d35f899
1 changed files with 1 additions and 10 deletions
|
|
@ -85,7 +85,6 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int nDataOut = 0;
|
||||
txnouttype whichType;
|
||||
BOOST_FOREACH(const CTxOut& txout, tx.vout) {
|
||||
if (!::IsStandard(txout.scriptPubKey, whichType, witnessEnabled) && !txout.IsFee()) {
|
||||
|
|
@ -93,9 +92,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
|
|||
return false;
|
||||
}
|
||||
|
||||
if (whichType == TX_NULL_DATA)
|
||||
nDataOut++;
|
||||
else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
|
||||
if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
|
||||
reason = "bare-multisig";
|
||||
return false;
|
||||
} else if ((txout.nAsset.IsExplicit() && txout.nAsset.GetAsset() == policyAsset) && txout.IsDust(dustRelayFee)) {
|
||||
|
|
@ -104,12 +101,6 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
|
|||
}
|
||||
}
|
||||
|
||||
// only one OP_RETURN txout is permitted
|
||||
if (nDataOut > 1) {
|
||||
reason = "multi-op-return";
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue