From 125c0381266e0e05a408f8e1818501ab73d29110 Mon Sep 17 00:00:00 2001 From: Amiti Uttarwar Date: Mon, 24 Aug 2020 17:00:05 -0700 Subject: [PATCH] [p2p] Remove dead code The else clause is dead code because the only way to not enter the if branch is if TX_WITNESS_STRIPPED is true. In that case, it would not have a witness to match the `tx.HasWitness()` else condition. Co-authored-by: Adam Jonas Co-authored-by: John Newbery --- src/net_processing.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 578d931505d..3135fcb20e3 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3121,8 +3121,6 @@ void PeerLogicValidation::ProcessMessage(CNode& pfrom, const std::string& msg_ty if (RecursiveDynamicUsage(*ptx) < 100000) { AddToCompactExtraTransactions(ptx); } - } else if (tx.HasWitness() && RecursiveDynamicUsage(*ptx) < 100000) { - AddToCompactExtraTransactions(ptx); } if (pfrom.HasPermission(PF_FORCERELAY)) {