Update state during pathfinding

This commit is contained in:
Tom Ritchford
2014-06-26 10:58:29 -04:00
committed by Nik Bougalis
parent feab6c39b3
commit f6bea08535
2 changed files with 7 additions and 1 deletions

View File

@@ -1216,7 +1216,8 @@ Json::Value Ledger::getJson (int options)
std::placeholders::_1));
else
mAccountStateMap->visitLeaves(
std::bind(stateItemTagAppender, state, std::placeholders::_1));
std::bind(stateItemTagAppender, std::ref(state),
std::placeholders::_1));
}
return ledger;

View File

@@ -51,6 +51,11 @@ TER nodeDeliverRev (
auto& previousNode = pathState.nodes()[nodeIndex - 1];
auto& node = pathState.nodes()[nodeIndex];
if (bMultiQuality)
node.currentDirectory_ = 0; // Restart book searching.
else
node.bDirectRestart = true; // Restart at same quality.
STAmount& saPrvDlvReq = previousNode.saRevDeliver;
// Accumulation of what the previous node must deliver.