Skip to content

Commit

Permalink
[p2p] Remove dead code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
3 people committed Sep 4, 2020
1 parent fc66d0a commit 125c038
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/net_processing.cpp
Expand Up @@ -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)) {
Expand Down

0 comments on commit 125c038

Please sign in to comment.