From 6f2f058cd8997020c672d9c1ac11814cb5a18b00 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 27 Apr 2012 11:48:32 -0700 Subject: [PATCH] Derive Serialized ledger and transaction classes from SerializedType, not STObject. --- src/SerializedLedger.cpp | 6 +++--- src/SerializedLedger.h | 2 +- src/SerializedTransaction.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/SerializedLedger.cpp b/src/SerializedLedger.cpp index 7cf36ed7e..4a566542a 100644 --- a/src/SerializedLedger.cpp +++ b/src/SerializedLedger.cpp @@ -2,7 +2,7 @@ #include "SerializedLedger.h" SerializedLedgerEntry::SerializedLedgerEntry(SerializerIterator& sit, const uint256& index) - : STObject("LedgerEntry"), mIndex(index) + : SerializedType("LedgerEntry"), mIndex(index) { uint16 type = sit.get16(); mFormat = getLgrFormat(static_cast(type)); @@ -13,7 +13,7 @@ SerializedLedgerEntry::SerializedLedgerEntry(SerializerIterator& sit, const uint } SerializedLedgerEntry::SerializedLedgerEntry(const Serializer& s, const uint256& index) - : STObject("LedgerEntry"), mIndex(index) + : SerializedType("LedgerEntry"), mIndex(index) { SerializerIterator sit(s); @@ -25,7 +25,7 @@ SerializedLedgerEntry::SerializedLedgerEntry(const Serializer& s, const uint256& mObject = STObject(mFormat->elements, sit); } -SerializedLedgerEntry::SerializedLedgerEntry(LedgerEntryType type) : STObject("LedgerEntry"), mType(type) +SerializedLedgerEntry::SerializedLedgerEntry(LedgerEntryType type) : SerializedType("LedgerEntry"), mType(type) { mFormat = getLgrFormat(type); if (mFormat == NULL) throw std::runtime_error("invalid ledger entry type"); diff --git a/src/SerializedLedger.h b/src/SerializedLedger.h index a87cb360c..628e6640f 100644 --- a/src/SerializedLedger.h +++ b/src/SerializedLedger.h @@ -5,7 +5,7 @@ #include "LedgerFormats.h" #include "NewcoinAddress.h" -class SerializedLedgerEntry : public STObject +class SerializedLedgerEntry : public SerializedType { public: typedef boost::shared_ptr pointer; diff --git a/src/SerializedTransaction.h b/src/SerializedTransaction.h index fe6609518..d4ac9f035 100644 --- a/src/SerializedTransaction.h +++ b/src/SerializedTransaction.h @@ -10,7 +10,7 @@ #include "TransactionFormats.h" #include "NewcoinAddress.h" -class SerializedTransaction : public STObject +class SerializedTransaction : public SerializedType { public: typedef boost::shared_ptr pointer;