[upstreamed] ask for orphan parents as witness-tx

This commit is contained in:
Gregory Sanders 2017-03-28 17:02:54 -04:00
parent 0460a1b159
commit cb78c612d7

View file

@ -6390,10 +6390,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
}
if (!fRejectedParents) {
uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus());
BOOST_FOREACH(const CTxIn& txin, tx.vin) {
CInv inv(MSG_TX, txin.prevout.hash);
pfrom->AddInventoryKnown(inv);
if (!AlreadyHave(inv)) pfrom->AskFor(inv);
CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
pfrom->AddInventoryKnown(_inv);
if (!AlreadyHave(_inv)) pfrom->AskFor(_inv);
}
AddOrphanTx(tx, pfrom->GetId());