mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 06:25:51 +00:00
Fix a major pathfinding bug. This improves pathfinding performance by a
factor of three, fixes many invalid paths and fixes redundant paths.
This commit is contained in:
@@ -413,7 +413,12 @@ bool Pathfinder::findPaths(const unsigned int iMaxSteps, const unsigned int iMax
|
||||
RippleState* rspEntry = (RippleState*) item.get();
|
||||
const uint160& uPeerID = rspEntry->getAccountIDPeer();
|
||||
|
||||
if (spPath.hasSeen(uPeerID, speEnd.mCurrencyID, uPeerID))
|
||||
if (speEnd.mCurrencyID != rspEntry->getLimit().getCurrency())
|
||||
{
|
||||
// wrong currency
|
||||
nothing();
|
||||
}
|
||||
else if (spPath.hasSeen(uPeerID, speEnd.mCurrencyID, uPeerID))
|
||||
{
|
||||
// Peer is in path already. Ignore it to avoid a loop.
|
||||
cLog(lsTRACE) <<
|
||||
|
||||
Reference in New Issue
Block a user