Tighten up some serialization checks

This commit is contained in:
David Schwartz
2014-06-20 09:53:19 -07:00
committed by Nik Bougalis
parent aec792f5b8
commit ed2c5078ad
7 changed files with 62 additions and 12 deletions

View File

@@ -41,9 +41,11 @@ enum SerializedTypeID
#undef FIELD
// high level types
// cannot be serialized inside other types
STI_TRANSACTION = 10001,
STI_LEDGERENTRY = 10002,
STI_VALIDATION = 10003,
STI_METADATA = 10004,
};
/** Identifies fields.
@@ -239,8 +241,9 @@ protected:
SField (SerializedTypeID id, int val);
};
extern const SField sfInvalid, sfGeneric, sfLedgerEntry, sfTransaction,
sfValidation;
extern const SField
sfInvalid, sfGeneric,
sfLedgerEntry, sfTransaction, sfValidation, sfMetadata;
#define FIELD(name, type, index) extern SField sf##name;
#define TYPE(name, type, index)