Revert changes inadvertently included in previous commit

This commit is contained in:
David Schwartz
2013-07-24 13:49:01 -07:00
parent 5188a1892e
commit e4998ed44b
2 changed files with 11 additions and 15 deletions

View File

@@ -15,7 +15,7 @@ Ledger::Ledger (const RippleAddress& masterID, uint64 startAmount)
, mCloseFlags (0) , mCloseFlags (0)
, mClosed (false) , mClosed (false)
, mValidHash (false) , mValidHash (false)
, mValidated (false) , mAccepted (false)
, mImmutable (false) , mImmutable (false)
, mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION)) , mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION))
, mAccountStateMap (boost::make_shared <SHAMap> (smtSTATE)) , mAccountStateMap (boost::make_shared <SHAMap> (smtSTATE))
@@ -59,7 +59,7 @@ Ledger::Ledger (uint256 const& parentHash,
, mCloseFlags (closeFlags) , mCloseFlags (closeFlags)
, mClosed (false) , mClosed (false)
, mValidHash (false) , mValidHash (false)
, mValidated (false) , mAccepted (false)
, mImmutable (true) , mImmutable (true)
, mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION, transHash)) , mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION, transHash))
, mAccountStateMap (boost::make_shared <SHAMap> (smtSTATE, accountHash)) , mAccountStateMap (boost::make_shared <SHAMap> (smtSTATE, accountHash))
@@ -98,7 +98,7 @@ Ledger::Ledger (Ledger& ledger,
, mCloseFlags (ledger.mCloseFlags) , mCloseFlags (ledger.mCloseFlags)
, mClosed (ledger.mClosed) , mClosed (ledger.mClosed)
, mValidHash (false) , mValidHash (false)
, mValidated (ledger.mValidated) , mAccepted (ledger.mAccepted)
, mImmutable (!isMutable) , mImmutable (!isMutable)
, mTransactionMap (ledger.mTransactionMap->snapShot (isMutable)) , mTransactionMap (ledger.mTransactionMap->snapShot (isMutable))
, mAccountStateMap (ledger.mAccountStateMap->snapShot (isMutable)) , mAccountStateMap (ledger.mAccountStateMap->snapShot (isMutable))
@@ -117,7 +117,7 @@ Ledger::Ledger (bool /* dummy */,
, mCloseFlags (0) , mCloseFlags (0)
, mClosed (false) , mClosed (false)
, mValidHash (false) , mValidHash (false)
, mValidated (true) , mAccepted (false)
, mImmutable (false) , mImmutable (false)
, mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION)) , mTransactionMap (boost::make_shared <SHAMap> (smtTRANSACTION))
, mAccountStateMap (prevLedger.mAccountStateMap->snapShot (true)) , mAccountStateMap (prevLedger.mAccountStateMap->snapShot (true))
@@ -149,7 +149,7 @@ Ledger::Ledger (Blob const& rawLedger,
bool hasPrefix) bool hasPrefix)
: mClosed (false) : mClosed (false)
, mValidHash (false) , mValidHash (false)
, mValidated (false) , mAccepted (false)
, mImmutable (true) , mImmutable (true)
{ {
Serializer s (rawLedger); Serializer s (rawLedger);
@@ -160,7 +160,7 @@ Ledger::Ledger (Blob const& rawLedger,
} }
Ledger::Ledger (const std::string& rawLedger, bool hasPrefix) : Ledger::Ledger (const std::string& rawLedger, bool hasPrefix) :
mClosed (false), mValidHash (false), mValidated (false), mImmutable (true) mClosed (false), mValidHash (false), mAccepted (false), mImmutable (true)
{ {
Serializer s (rawLedger); Serializer s (rawLedger);
setRaw (s, hasPrefix); setRaw (s, hasPrefix);

View File

@@ -1,4 +1,4 @@
l//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/* /*
Copyright (c) 2011-2013, OpenCoin, Inc. Copyright (c) 2011-2013, OpenCoin, Inc.
*/ */
@@ -93,18 +93,14 @@ public:
} }
void setAccepted (uint32 closeTime, int closeResolution, bool correctCloseTime); void setAccepted (uint32 closeTime, int closeResolution, bool correctCloseTime);
void setAccepted (); void setAccepted ();
void setValidated ()
{
mValidated = mClosed = true;
}
void setImmutable (); void setImmutable ();
bool isClosed () bool isClosed ()
{ {
return mClosed; return mClosed;
} }
bool isValidated () bool isAccepted ()
{ {
return mValidated; return mAccepted;
} }
bool isImmutable () bool isImmutable ()
{ {
@@ -430,7 +426,7 @@ protected:
// returned SLE is immutable // returned SLE is immutable
SLE::pointer getASNodeI (uint256 const & nodeID, LedgerEntryType let); SLE::pointer getASNodeI (uint256 const & nodeID, LedgerEntryType let);
void saveValidatedLedger (Job&); void saveAcceptedLedger (Job&, bool fromConsensus);
void updateFees (); void updateFees ();
@@ -453,7 +449,7 @@ private:
uint32 mParentCloseTime; // when the previous ledger closed uint32 mParentCloseTime; // when the previous ledger closed
int mCloseResolution; // the resolution for this ledger close time (2-120 seconds) int mCloseResolution; // the resolution for this ledger close time (2-120 seconds)
uint32 mCloseFlags; // flags indicating how this ledger close took place uint32 mCloseFlags; // flags indicating how this ledger close took place
bool mClosed, mValidHash, mValidated, mImmutable; bool mClosed, mValidHash, mAccepted, mImmutable;
uint32 mReferenceFeeUnits; // Fee units for the reference transaction uint32 mReferenceFeeUnits; // Fee units for the reference transaction
uint32 mReserveBase, mReserveIncrement; // Reserve basse and increment in fee units uint32 mReserveBase, mReserveIncrement; // Reserve basse and increment in fee units