Track fields not serialized for signing hashes in a more sensible way.

This commit is contained in:
JoelKatz
2012-11-02 17:05:19 -07:00
parent a17e02e35f
commit 1af46fbe13
3 changed files with 13 additions and 8 deletions

View File

@@ -283,13 +283,8 @@ void STObject::add(Serializer& s, bool withSigningFields) const
BOOST_FOREACH(const SerializedType& it, mData)
{ // pick out the fields and sort them
if ((it.getSType() != STI_NOTPRESENT) && it.getFName().isBinary())
{
SField::ref fName = it.getFName();
if (withSigningFields ||
((fName != sfTxnSignature) && (fName != sfTxnSignatures) && (fName != sfSignature)))
if ((it.getSType() != STI_NOTPRESENT) && it.getFName().shouldInclude(withSigningFields))
fields.insert(std::make_pair(it.getFName().fieldCode, &it));
}
}