Reported by @roasbeef and @chjj on IRC.
Describe the issue
When we receive a transaction with an unknown input, since 0.13.0 we send a getdata for that transaction in response, to quickly learn the dependency. Unfortunately, we always ask for it as MSG_TX instead of MSG_WITNESS_TX.
Can you reliably reproduce the issue?
018:20:33 < roasbeef> hmm, chjj and I seem to be encountering some odd behavior with segwit enabled core nodes on testnet: they aren't including witness_tx inv's in their getdata's when
1 fetching transactions, so they fetch witness output spending transactions without the witness data (though the service bit is set). this should cause an immediate
2 rejecvt due to the clean-stack rules, but they keep accepting the txns, sending a delayed reject minutes afterwards
318:26:52 < sipa> roasbeef: they send MSG_TX getdatas instead of MSG_WITNESS_TX ?
418:27:11 < roasbeef> sipa: yeh
Expected behaviour
Don’t see any MSG_TX getdatas between witness-enabled peers.
Actual behaviour
See some MSG_TX getdatas.
What version of bitcoin-core are you using?
018:28:08 < chjj> sipa: seems to be both 13.0 and 13.1 nodes