diff options
author | Gregory Maxwell <greg@xiph.org> | 2016-11-18 19:11:08 +0000 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-12-02 08:38:02 +0100 |
commit | ca1fd7521e86b016f2aa92048a13a297bab3c074 (patch) | |
tree | 0b4322f0cb464ae207285b538196dcb605d545e5 | |
parent | b96a8f7df23956cc4c41c414a01964c9cad54699 (diff) | |
download | bitcoin-ca1fd7521e86b016f2aa92048a13a297bab3c074.tar.xz |
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.
Github-Pull: #9188
Rebased-From: 5b0150a060208faf436c09b0ca9463407a869c72
-rw-r--r-- | src/main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index addc0f93a6..962960a150 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5586,10 +5586,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()); |