Fix a bug Jed reported. More JSON work. Redo format layouts.

This commit is contained in:
JoelKatz
2012-10-01 20:09:24 -07:00
parent e7c9ee09f6
commit e2c257f50b
12 changed files with 335 additions and 264 deletions

View File

@@ -3,18 +3,23 @@
#include "HashPrefixes.h"
SOElement SerializedValidation::sValidationFormat[] = {
{ sfFlags, SOE_REQUIRED },
{ sfLedgerHash, SOE_REQUIRED },
{ sfLedgerSequence, SOE_OPTIONAL },
{ sfCloseTime, SOE_OPTIONAL },
{ sfLoadFee, SOE_OPTIONAL },
{ sfBaseFee, SOE_OPTIONAL },
{ sfSigningTime, SOE_REQUIRED },
{ sfSigningPubKey, SOE_REQUIRED },
{ sfInvalid, SOE_END }
std::vector<SOElement::ptr> sValidationFormat;
static bool SVFInit()
{
sValidationFormat.push_back(new SOElement(sfFlags, SOE_REQUIRED));
sValidationFormat.push_back(new SOElement(sfLedgerHash, SOE_REQUIRED));
sValidationFormat.push_back(new SOElement(sfLedgerSequence, SOE_OPTIONAL));
sValidationFormat.push_back(new SOElement(sfCloseTime, SOE_OPTIONAL));
sValidationFormat.push_back(new SOElement(sfLoadFee, SOE_OPTIONAL));
sValidationFormat.push_back(new SOElement(sfBaseFee, SOE_OPTIONAL));
sValidationFormat.push_back(new SOElement(sfSigningTime, SOE_REQUIRED));
sValidationFormat.push_back(new SOElement(sfSigningPubKey, SOE_REQUIRED));
return true;
};
bool SVFinitComplete = SVFInit();
const uint32 SerializedValidation::sFullFlag = 0x00010000;
SerializedValidation::SerializedValidation(SerializerIterator& sit, bool checkSignature)