mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Try to track down the bug that's causing isEquivalent to return false on a reconstructed transaction.
This commit is contained in:
@@ -379,7 +379,10 @@ bool STObject::isEquivalent (const SerializedType& t) const
|
||||
const STObject* v = dynamic_cast<const STObject*> (&t);
|
||||
|
||||
if (!v)
|
||||
{
|
||||
WriteLog (lsDEBUG, STObject) << "notEquiv " << getFullText() << " not object";
|
||||
return false;
|
||||
}
|
||||
|
||||
boost::ptr_vector<SerializedType>::const_iterator it1 = mData.begin (), end1 = mData.end ();
|
||||
boost::ptr_vector<SerializedType>::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<const STArray*> (&t);
|
||||
|
||||
if (!v)
|
||||
{
|
||||
WriteLog (lsDEBUG, STObject) << "notEquiv " << getFullText() << " not array";
|
||||
return false;
|
||||
}
|
||||
|
||||
return value == v->value;
|
||||
}
|
||||
|
||||
@@ -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 ()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user