p2p: ensure inv is GenMsgTx before ToGenTxid in inv processing
p2p: ensure inv is GenMsgTx before ToGenTxid in inv processing

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.

andreaskern/bitcoin,alecalve/bitcoin,apoelstra/bitcoin,practicalswift/bitcoin,domob1812/bitcoin,rnicoll/bitcoin,JeremyRubin/bitcoin,GroestlCoin/bitcoin,Xekyo/bitcoin,jambolo/bitcoin,anditto/bitcoin,prusnak/bitcoin,lateminer/bitcoin,Sjors/bitcoin,rnicoll/bitcoin,namecoin/namecoin-core,alecalve/bitcoin,n1bor/bitcoin,dscotese/bitcoin,bitcoinknots/bitcoin,namecoin/namecore,tecnovert/particl-core,AkioNak/bitcoin,GroestlCoin/GroestlCoin,ElementsProject/elements,MarcoFalke/bitcoin,bitcoin/bitcoin,GroestlCoin/GroestlCoin,jlopp/statoshi,instagibbs/bitcoin,bitcoinknots/bitcoin,dscotese/bitcoin,practicalswift/bitcoin,fanquake/bitcoin,EthanHeilman/bitcoin,JeremyRubin/bitcoin,particl/particl-core,instagibbs/bitcoin,AkioNak/bitcoin,AkioNak/bitcoin,qtumproject/qtum,ElementsProject/elements,Sjors/bitcoin,sstone/bitcoin,bitcoinknots/bitcoin,anditto/bitcoin,fujicoin/fujicoin,MeshCollider/bitcoin,ElementsProject/elements,rnicoll/dogecoin,jambolo/bitcoin,cdecker/bitcoin,MarcoFalke/bitcoin,pataquets/namecoin-core,pataquets/namecoin-core,MeshCollider/bitcoin,achow101/bitcoin,yenliangl/bitcoin,bitcoinknots/bitcoin,pstratem/bitcoin,litecoin-project/litecoin,ajtowns/bitcoin,rnicoll/dogecoin,pstratem/bitcoin,prusnak/bitcoin,litecoin-project/litecoin,AkioNak/bitcoin,bitcoin/bitcoin,Xekyo/bitcoin,namecoin/namecore,namecoin/namecore,JeremyRubin/bitcoin,achow101/bitcoin,instagibbs/bitcoin,anditto/bitcoin,jnewbery/bitcoin,achow101/bitcoin,alecalve/bitcoin,yenliangl/bitcoin,ajtowns/bitcoin,cdecker/bitcoin,n1bor/bitcoin,ajtowns/bitcoin,GroestlCoin/bitcoin,jlopp/statoshi,domob1812/namecore,apoelstra/bitcoin,particl/particl-core,domob1812/bitcoin,jlopp/statoshi,yenliangl/bitcoin,lateminer/bitcoin,MeshCollider/bitcoin,rnicoll/bitcoin,particl/particl-core,instagibbs/bitcoin,EthanHeilman/bitcoin,EthanHeilman/bitcoin,jonasschnelli/bitcoin,Xekyo/bitcoin,mruddy/bitcoin,MeshCollider/bitcoin,kallewoof/bitcoin,bitcoinsSG/bitcoin,mm-s/bitcoin,kallewoof/bitcoin,pstratem/bitcoin,alecalve/bitcoin,jnewbery/bitcoin,fanquake/bitcoin,ElementsProject/elements,litecoin-project/litecoin,EthanHeilman/bitcoin,domob1812/namecore,sipsorcery/bitcoin,JeremyRubin/bitcoin,cdecker/bitcoin,yenliangl/bitcoin,JeremyRubin/bitcoin,jlopp/statoshi,mruddy/bitcoin,bitcoin/bitcoin,sstone/bitcoin,tecnovert/particl-core,tecnovert/particl-core,sipsorcery/bitcoin,lateminer/bitcoin,fujicoin/fujicoin,andreaskern/bitcoin,GroestlCoin/GroestlCoin,sstone/bitcoin,lateminer/bitcoin,jonasschnelli/bitcoin,jonasschnelli/bitcoin,kallewoof/bitcoin,apoelstra/bitcoin,Xekyo/bitcoin,jlopp/statoshi,GroestlCoin/bitcoin,namecoin/namecore,AkioNak/bitcoin,MarcoFalke/bitcoin,pstratem/bitcoin,sstone/bitcoin,pataquets/namecoin-core,sipsorcery/bitcoin,prusnak/bitcoin,AkioNak/bitcoin,tecnovert/particl-core,lateminer/bitcoin,pataquets/namecoin-core,fanquake/bitcoin,mruddy/bitcoin,pataquets/namecoin-core,qtumproject/qtum,tecnovert/particl-core,cdecker/bitcoin,dscotese/bitcoin,bitcoinsSG/bitcoin,prusnak/bitcoin,kallewoof/bitcoin,tecnovert/particl-core,practicalswift/bitcoin,alecalve/bitcoin,bitcoinsSG/bitcoin,yenliangl/bitcoin,bitcoin/bitcoin,fanquake/bitcoin,fujicoin/fujicoin,n1bor/bitcoin,Xekyo/bitcoin,GroestlCoin/GroestlCoin,cdecker/bitcoin,GroestlCoin/bitcoin,MeshCollider/bitcoin,bitcoinsSG/bitcoin,sstone/bitcoin,instagibbs/bitcoin,jambolo/bitcoin,qtumproject/qtum,pstratem/bitcoin,prusnak/bitcoin,namecoin/namecoin-core,rnicoll/dogecoin,jambolo/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,litecoin-project/litecoin,mruddy/bitcoin,jambolo/bitcoin,rnicoll/bitcoin,namecoin/namecoin-core,dscotese/bitcoin,n1bor/bitcoin,mm-s/bitcoin,instagibbs/bitcoin,mruddy/bitcoin,qtumproject/qtum,Sjors/bitcoin,jamesob/bitcoin,jambolo/bitcoin,kallewoof/bitcoin,andreaskern/bitcoin,MarcoFalke/bitcoin,apoelstra/bitcoin,jonasschnelli/bitcoin,mm-s/bitcoin,achow101/bitcoin,sstone/bitcoin,namecoin/namecoin-core,domob1812/namecore,namecoin/namecoin-core,jamesob/bitcoin,rnicoll/dogecoin,ajtowns/bitcoin,particl/particl-core,EthanHeilman/bitcoin,andreaskern/bitcoin,apoelstra/bitcoin,namecoin/namecoin-core,fujicoin/fujicoin,domob1812/bitcoin,GroestlCoin/GroestlCoin,fanquake/bitcoin,jamesob/bitcoin,apoelstra/bitcoin,jnewbery/bitcoin,domob1812/bitcoin,bitcoinsSG/bitcoin,GroestlCoin/bitcoin,bitcoin/bitcoin,litecoin-project/litecoin,JeremyRubin/bitcoin,andreaskern/bitcoin,sipsorcery/bitcoin,jamesob/bitcoin,jnewbery/bitcoin,practicalswift/bitcoin,lateminer/bitcoin,pataquets/namecoin-core,rnicoll/dogecoin,cdecker/bitcoin,anditto/bitcoin,anditto/bitcoin,bitcoinknots/bitcoin,ajtowns/bitcoin,jlopp/statoshi,fujicoin/fujicoin,domob1812/namecore,ElementsProject/elements,Sjors/bitcoin,bitcoin/bitcoin,fujicoin/fujicoin,rnicoll/bitcoin,rnicoll/bitcoin,dscotese/bitcoin,andreaskern/bitcoin,MarcoFalke/bitcoin,pstratem/bitcoin,n1bor/bitcoin,jamesob/bitcoin,qtumproject/qtum,ajtowns/bitcoin,domob1812/namecore,domob1812/namecore,jonasschnelli/bitcoin,MarcoFalke/bitcoin,particl/particl-core,mm-s/bitcoin,sipsorcery/bitcoin,n1bor/bitcoin,mruddy/bitcoin,namecoin/namecore,prusnak/bitcoin,alecalve/bitcoin,Sjors/bitcoin,domob1812/bitcoin,practicalswift/bitcoin,EthanHeilman/bitcoin,qtumproject/qtum,achow101/bitcoin,dscotese/bitcoin,mm-s/bitcoin,namecoin/namecore,ElementsProject/elements,practicalswift/bitcoin,sipsorcery/bitcoin,fanquake/bitcoin,GroestlCoin/bitcoin,jamesob/bitcoin,mm-s/bitcoin,bitcoinsSG/bitcoin,achow101/bitcoin,jnewbery/bitcoin,yenliangl/bitcoin,GroestlCoin/GroestlCoin,domob1812/bitcoin,Xekyo/bitcoin,kallewoof/bitcoin,qtumproject/qtum,particl/particl-core,litecoin-project/litecoin