Skip to content

Commit 5b0150a

Browse files
committed
Make orphan parent fetching ask for witnesses.
In 0.13 orphan transactions began being treated as implicit INVs for their parents. But the resulting getdata were not getting the witness flag. This fixes issue #9182 reported by chjj and roasbeef on IRC.
1 parent 9346f84 commit 5b0150a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5686,8 +5686,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
56865686
}
56875687
}
56885688
if (!fRejectedParents) {
5689+
uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus());
56895690
BOOST_FOREACH(const CTxIn& txin, tx.vin) {
5690-
CInv _inv(MSG_TX, txin.prevout.hash);
5691+
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
56915692
pfrom->AddInventoryKnown(_inv);
56925693
if (!AlreadyHave(_inv)) pfrom->AskFor(_inv);
56935694
}

0 commit comments

Comments
 (0)