aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmiti Uttarwar <[email protected]>2020-08-24 17:00:05 -0700
committerAmiti Uttarwar <[email protected]>2020-09-04 14:42:30 -0700
commit125c0381266e0e05a408f8e1818501ab73d29110 (patch)
treeb45dc5bfd952bf948e55233fba305541e13f5845
parent[p2p] Check for nullptr before dereferencing pointer (diff)
downloaddiscoin-125c0381266e0e05a408f8e1818501ab73d29110.tar.xz
discoin-125c0381266e0e05a408f8e1818501ab73d29110.zip
[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 <[email protected]> Co-authored-by: John Newbery <[email protected]>
-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 578d93150..3135fcb20 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)) {