Pathfinding dispatch improvements

* Keep requests forwards, flip only on insert
* Insert requests in more sensible order (after new, before old)
* Remove a redundant cache/request check
This commit is contained in:
JoelKatz
2014-02-04 13:15:24 -08:00
committed by Vinnie Falco
parent 41c0702408
commit f2beb82b97
3 changed files with 32 additions and 18 deletions

View File

@@ -74,6 +74,12 @@ bool PathRequest::isValid ()
return bValid;
}
bool PathRequest::isNew ()
{
// does this path request still need its first full path
return iLastIndex.load() == 0;
}
bool PathRequest::needsUpdate (bool newOnly, LedgerIndex index)
{
LedgerIndex lastIndex = iLastIndex.load();