Skip to content

Commit

Permalink
Fix the ledger range we advertise to peers
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelKatz authored and vinniefalco committed Mar 4, 2014
1 parent 8b1df06 commit adc4c85
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ripple_app/ledger/LedgerMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,11 +424,16 @@ class LedgerMasterImp
return true;
}

// Get the earliest ledger we will let peers fetch
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();
if (e > getConfig().FETCH_DEPTH)
e -= getConfig().FETCH_DEPTH;
else
e = 0;
return e;
}

Expand Down

0 comments on commit adc4c85

Please sign in to comment.