```
and otherwise log that an unknown INV type was received.
In INV processing, when handling transaction type inv messages,
ToGenTxid() expects that we constructed the CInv ourselves or
that we verified that it is for a transaction type CInv.
Therefore, change this `else` branch into an `else if (inv.GenMsgTx())`
to make this safer and log any INVs that fall through.
```
Completes backport of core#19610:
https://github.com/bitcoin/bitcoin/pull/19610/commits/fb56d37612dea6666e7da73d671311a697570dae
Depends on D9507.