diff --git a/modules/ripple_data/protocol/ripple_SerializedObject.cpp b/modules/ripple_data/protocol/ripple_SerializedObject.cpp index 82ce1284a..5a07dd568 100644 --- a/modules/ripple_data/protocol/ripple_SerializedObject.cpp +++ b/modules/ripple_data/protocol/ripple_SerializedObject.cpp @@ -379,7 +379,10 @@ bool STObject::isEquivalent (const SerializedType& t) const const STObject* v = dynamic_cast (&t); if (!v) + { + WriteLog (lsDEBUG, STObject) << "notEquiv " << getFullText() << " not object"; return false; + } boost::ptr_vector::const_iterator it1 = mData.begin (), end1 = mData.end (); boost::ptr_vector::const_iterator it2 = v->mData.begin (), end2 = v->mData.end (); @@ -387,7 +390,19 @@ bool STObject::isEquivalent (const SerializedType& t) const while ((it1 != end1) && (it2 != end2)) { if ((it1->getSType () != it2->getSType ()) || !it1->isEquivalent (*it2)) + { + if (it1->getSType () != it2->getSType ()) + { + WriteLog (lsDEBUG, STObject) << "notEquiv type " << it1->getFullText() << " != " + << it2->getFullText(); + } + else + { + WriteLog (lsDEBUG, STObject) << "notEquiv " << it1->getFullText() << " != " + << it2->getFullText(); + } return false; + } ++it1; ++it2; @@ -1164,7 +1179,10 @@ bool STArray::isEquivalent (const SerializedType& t) const const STArray* v = dynamic_cast (&t); if (!v) + { + WriteLog (lsDEBUG, STObject) << "notEquiv " << getFullText() << " not array"; return false; + } return value == v->value; } diff --git a/modules/ripple_data/protocol/ripple_SerializedTypes.cpp b/modules/ripple_data/protocol/ripple_SerializedTypes.cpp index 43ae0bbba..eaacad42e 100644 --- a/modules/ripple_data/protocol/ripple_SerializedTypes.cpp +++ b/modules/ripple_data/protocol/ripple_SerializedTypes.cpp @@ -22,6 +22,14 @@ SerializedType& SerializedType::operator= (const SerializedType& t) return *this; } +bool SerializedType::isEquivalent (const SerializedType& t) const +{ + assert (getSType () == STI_NOTPRESENT); + if (t.getSType () == STI_NOTPRESENT) + return true; + WriteLog (lsDEBUG, SerializedType) << "notEquiv " << getFullText() << " not STI_NOTPRESENT"; + return false; +} void STPathSet::printDebug () { diff --git a/modules/ripple_data/protocol/ripple_SerializedTypes.h b/modules/ripple_data/protocol/ripple_SerializedTypes.h index 20eff2c06..5137d21be 100644 --- a/modules/ripple_data/protocol/ripple_SerializedTypes.h +++ b/modules/ripple_data/protocol/ripple_SerializedTypes.h @@ -113,11 +113,7 @@ public: ; } - virtual bool isEquivalent (const SerializedType& t) const - { - assert (getSType () == STI_NOTPRESENT); - return t.getSType () == STI_NOTPRESENT; - } + virtual bool isEquivalent (const SerializedType& t) const; void addFieldID (Serializer& s) const {