From cb78c612d7d5f87f70d25030f85bd07647bc5ff1 Mon Sep 17 00:00:00 2001 From: Gregory Sanders Date: Tue, 28 Mar 2017 17:02:54 -0400 Subject: [PATCH] [upstreamed] ask for orphan parents as witness-tx --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 5a8af905ef..ef2a024bd6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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());