aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Maxwell <[email protected]>2016-11-18 19:11:08 +0000
committerGregory Maxwell <[email protected]>2016-11-18 19:11:08 +0000
commit5b0150a060208faf436c09b0ca9463407a869c72 (patch)
tree949890fd2af23c00a7f1fab25a5f3c7df0e76b75
parentMerge #9075: Decouple peer-processing-logic from block-connection-logic (#3) (diff)
downloaddiscoin-5b0150a060208faf436c09b0ca9463407a869c72.tar.xz
discoin-5b0150a060208faf436c09b0ca9463407a869c72.zip
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.
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 263421aea..9af612bb5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5686,8 +5686,9 @@ 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);
+ CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
pfrom->AddInventoryKnown(_inv);
if (!AlreadyHave(_inv)) pfrom->AskFor(_inv);
}