aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-08-24 17:00:05 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-09-04 14:42:30 -0700
commit125c0381266e0e05a408f8e1818501ab73d29110 (patch)
treeb45dc5bfd952bf948e55233fba305541e13f5845 /src/net_processing.cpp
parentfc66d0a65cdc52a3b259effe0c29b5eafb1b5ff5 (diff)
downloadbitcoin-125c0381266e0e05a408f8e1818501ab73d29110.tar.xz
[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 <jonas@chaincode.com> Co-authored-by: John Newbery <john@johnnewbery.com>
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 578d931505..3135fcb20e 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)) {