mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix the ledger range we advertise to peers
This commit is contained in:
@@ -424,11 +424,16 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the earliest ledger we will let peers fetch
|
||||||
uint32 getEarliestFetch ()
|
uint32 getEarliestFetch ()
|
||||||
{
|
{
|
||||||
|
// The earliest ledger we will let people fetch is ledger zero,
|
||||||
|
// unless that creates a larger range than allowed
|
||||||
uint32 e = getClosedLedger()->getLedgerSeq();
|
uint32 e = getClosedLedger()->getLedgerSeq();
|
||||||
if (e > getConfig().FETCH_DEPTH)
|
if (e > getConfig().FETCH_DEPTH)
|
||||||
e -= getConfig().FETCH_DEPTH;
|
e -= getConfig().FETCH_DEPTH;
|
||||||
|
else
|
||||||
|
e = 0;
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user