Align constant names for maximum compact block / blocktxn depth
This commit is contained in:
@@ -4919,7 +4919,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
||||
// they wont have a useful mempool to match against a compact block,
|
||||
// and we don't feel like constructing the object for them, so
|
||||
// instead we respond with the full, non-compact block.
|
||||
if (mi->second->nHeight >= chainActive.Height() - 10) {
|
||||
if (CanDirectFetch(consensusParams) && mi->second->nHeight >= chainActive.Height() - MAX_BLOCKTXN_DEPTH) {
|
||||
CBlockHeaderAndShortTxIDs cmpctblock(block);
|
||||
pfrom->PushMessage(NetMsgType::CMPCTBLOCK, cmpctblock);
|
||||
} else
|
||||
@@ -5426,8 +5426,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (it->second->nHeight < chainActive.Height() - 15) {
|
||||
LogPrint("net", "Peer %d sent us a getblocktxn for a block > 15 deep", pfrom->id);
|
||||
if (it->second->nHeight < chainActive.Height() - MAX_BLOCKTXN_DEPTH) {
|
||||
LogPrint("net", "Peer %d sent us a getblocktxn for a block > %i deep", pfrom->id, MAX_BLOCKTXN_DEPTH);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user