diff --git a/src/cpp/ripple/SerializedTypes.cpp b/src/cpp/ripple/SerializedTypes.cpp index 11ed9794b2..46e599b4ff 100644 --- a/src/cpp/ripple/SerializedTypes.cpp +++ b/src/cpp/ripple/SerializedTypes.cpp @@ -415,16 +415,20 @@ bool STPathSet::isEquivalent(const SerializedType& t) const return v && (value == v->value); } -bool STPath::hasSeen(const uint160 &acct) { - - for (int i = 0; i < mPath.size();i++) { +bool STPath::hasSeen(const uint160 &uAccountId, const uint160& uCurrencyID, const uint160& uIssuerID) +{ + for (int i = 0; i < mPath.size(); ++i) { STPathElement ele = getElement(i); - if (ele.getAccountID() == acct) + + if (ele.getAccountID() == uAccountId + && ele.getCurrency() == uCurrencyID + && ele.getIssuerID() == uIssuerID) return true; } return false; } + int STPath::getSerializeSize() const { int iBytes = 0; diff --git a/src/cpp/ripple/SerializedTypes.h b/src/cpp/ripple/SerializedTypes.h index 2ca0d74211..0a05fa225f 100644 --- a/src/cpp/ripple/SerializedTypes.h +++ b/src/cpp/ripple/SerializedTypes.h @@ -623,7 +623,7 @@ public: const STPathElement& getElement(int offset) { return mPath[offset]; } void addElement(const STPathElement &e) { mPath.push_back(e); } void clear() { mPath.clear(); } - bool hasSeen(const uint160 &acct); + bool hasSeen(const uint160 &uAccountId, const uint160& uCurrencyID, const uint160& uIssuerID); int getSerializeSize() const; // std::string getText() const; Json::Value getJson(int) const;