Add opperator==() for PathNodes.

This commit is contained in:
Arthur Britto
2012-12-05 17:28:16 -08:00
parent 7871df819a
commit 4b6b1eebd9
2 changed files with 14 additions and 0 deletions

View File

@@ -27,6 +27,14 @@ std::size_t hash_value(const aciSource& asValue)
return seed;
}
// Compare the non-calculated fields.
bool PaymentNode::operator==(const PaymentNode& pnOther) const {
return pnOther.uFlags == uFlags
&& pnOther.uAccountID == uAccountID
&& pnOther.uCurrencyID == uCurrencyID
&& pnOther.uIssuerID == uIssuerID;
}
//
// PathState implementation
//
@@ -272,6 +280,8 @@ TER PathState::pushNode(
return terResult;
}
// Set to an expanded path.
//
// terStatus = tesSUCCESS, temBAD_PATH, terNO_LINE, or temBAD_PATH_LOOP
void PathState::setExpanded(
const LedgerEntrySet& lesSource,
@@ -428,6 +438,7 @@ cLog(lsDEBUG) << boost::str(boost::format("PathState: receiver implied: account=
% getJson());
}
// Set to a canonical path.
void PathState::setCanonical(
const PathState& psExpanded
)