Skip to content

Commit 125c038

Browse files
amitiuttarwaradamjonasjnewbery
committed
[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]>
1 parent fc66d0a commit 125c038

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/net_processing.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3121,8 +3121,6 @@ void PeerLogicValidation::ProcessMessage(CNode& pfrom, const std::string& msg_ty
31213121
if (RecursiveDynamicUsage(*ptx) < 100000) {
31223122
AddToCompactExtraTransactions(ptx);
31233123
}
3124-
} else if (tx.HasWitness() && RecursiveDynamicUsage(*ptx) < 100000) {
3125-
AddToCompactExtraTransactions(ptx);
31263124
}
31273125

31283126
if (pfrom.HasPermission(PF_FORCERELAY)) {

0 commit comments

Comments
 (0)