mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Add RequireStandard chain parameter
This commit is contained in:
parent
21913a9ac9
commit
cfeb8235fd
3 changed files with 6 additions and 2 deletions
|
|
@ -833,7 +833,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||
|
||||
// Rather not work on nonstandard transactions (unless -testnet/-regtest)
|
||||
string reason;
|
||||
if (Params().NetworkID() == CChainParams::MAIN && !IsStandardTx(tx, reason))
|
||||
if (Params().RequireStandard() && !IsStandardTx(tx, reason))
|
||||
return state.DoS(0,
|
||||
error("AcceptToMemoryPool : nonstandard transaction: %s", reason),
|
||||
REJECT_NONSTANDARD, reason);
|
||||
|
|
@ -894,7 +894,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
|||
}
|
||||
|
||||
// Check for non-standard pay-to-script-hash in inputs
|
||||
if (Params().NetworkID() == CChainParams::MAIN && !AreInputsStandard(tx, view))
|
||||
if (Params().RequireStandard() && !AreInputsStandard(tx, view))
|
||||
return error("AcceptToMemoryPool: : nonstandard transaction input");
|
||||
|
||||
// Note: if you modify this code to accept non-standard transactions, then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue