diff options
Diffstat (limited to 'src/net_processing.cpp')
| -rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 582d9fcad..bf6cb77c1 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2180,7 +2180,7 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr LogPrint(BCLog::NET, "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), pfrom->GetId()); for (; pindex; pindex = chainActive.Next(pindex)) { - vHeaders.push_back(pindex->GetBlockHeader()); + vHeaders.push_back(pindex->GetBlockHeader(chainparams.GetConsensus())); if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop) break; } @@ -3423,14 +3423,14 @@ bool PeerLogicValidation::SendMessages(CNode* pto) pBestIndex = pindex; if (fFoundStartingHeader) { // add this to the headers message - vHeaders.push_back(pindex->GetBlockHeader()); + vHeaders.push_back(pindex->GetBlockHeader(consensusParams)); } else if (PeerHasHeader(&state, pindex)) { continue; // keep looking for the first new block } else if (pindex->pprev == nullptr || PeerHasHeader(&state, pindex->pprev)) { // Peer doesn't have this header but they do have the prior one. // Start sending headers. fFoundStartingHeader = true; - vHeaders.push_back(pindex->GetBlockHeader()); + vHeaders.push_back(pindex->GetBlockHeader(consensusParams)); } else { // Peer doesn't have this header or the prior one -- nothing will // connect, so bail out. |