From 31fe87df114e67f0a5d41d30605a799e736b72c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Haf?= Date: Mon, 28 Oct 2024 15:12:19 +0100 Subject: [PATCH] remove segwit tx in mempool --- src/policy/policy.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp index f58803935d..40d8c682a3 100644 --- a/src/policy/policy.cpp +++ b/src/policy/policy.cpp @@ -181,6 +181,9 @@ bool IsStandardTx(const CTransaction& tx, const std::optional& max_dat else if ((whichType == TxoutType::MULTISIG) && (!permit_bare_multisig)) { MaybeReject("bare-multisig"); } + else if (whichType == TxoutType::WITNESS_V0_SCRIPTHASH || whichType == TxoutType::WITNESS_V0_KEYHASH || whichType == TxoutType::WITNESS_V1_TAPROOT || whichType == TxoutType::WITNESS_UNKNOWN){ + MaybeReject("Segwit"); + } if (IsDust(txout, dust_relay_fee)) { MaybeReject("dust"); }