diff --git a/src/cpp/ripple/Config.cpp b/src/cpp/ripple/Config.cpp index 8d0656e3c0..129f25965f 100644 --- a/src/cpp/ripple/Config.cpp +++ b/src/cpp/ripple/Config.cpp @@ -60,7 +60,7 @@ #define DEFAULT_FEE_OPERATION 1 Config theConfig; -const char* ALPHABET = NULL; +const char* ALPHABET = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; void Config::setup(const std::string& strConf, bool bTestNet, bool bQuiet) { @@ -89,9 +89,8 @@ void Config::setup(const std::string& strConf, bool bTestNet, bool bQuiet) SIGN_VALIDATION = TESTNET ? sHP_TestNetValidation : sHP_Validation; SIGN_PROPOSAL = TESTNET ? sHP_TestNetProposal : sHP_Proposal; - ALPHABET = TESTNET - ? "RPShNAF39wBUDnEGHJKLM4pQrsT7VWXYZ2bcdeCg65jkm8ofqi1tuvaxyz" - : "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; + if (TESTNET) + ALPHABET = "RPShNAF39wBUDnEGHJKLM4pQrsT7VWXYZ2bcdeCg65jkm8ofqi1tuvaxyz"; if (!strConf.empty()) { diff --git a/src/cpp/ripple/Ledger.cpp b/src/cpp/ripple/Ledger.cpp index 9581a32d96..273d765150 100644 --- a/src/cpp/ripple/Ledger.cpp +++ b/src/cpp/ripple/Ledger.cpp @@ -378,6 +378,12 @@ void Ledger::saveAcceptedLedger(bool fromConsensus, LoadEvent::pointer event) assert (getAccountHash() == mAccountStateMap->getHash()); assert (getTransHash() == mTransactionMap->getHash()); + // Save the ledger header in the hashed object store + Serializer s(128); + s.add32(sHP_Ledger); + addRaw(s); + theApp->getHashedObjectStore().store(hotLEDGER, mLedgerSeq, s.peekData(), mHash); + { { ScopedLock sl(theApp->getLedgerDB()->getDBLock()); diff --git a/src/cpp/ripple/LedgerAcquire.cpp b/src/cpp/ripple/LedgerAcquire.cpp index 8f5e744cb7..c023811eb9 100644 --- a/src/cpp/ripple/LedgerAcquire.cpp +++ b/src/cpp/ripple/LedgerAcquire.cpp @@ -827,7 +827,10 @@ void LedgerAcquireMaster::sweep() while (it != mLedgers.end()) { if (it->second->getLastAction() > now) + { it->second->touch(); + ++it; + } else if ((it->second->getLastAction() + 60) < now) mLedgers.erase(it++); else diff --git a/src/cpp/ripple/RangeSet.cpp b/src/cpp/ripple/RangeSet.cpp index cc9e6d9abe..43d468807b 100644 --- a/src/cpp/ripple/RangeSet.cpp +++ b/src/cpp/ripple/RangeSet.cpp @@ -115,12 +115,10 @@ BOOST_AUTO_TEST_CASE(RangeSet_test) RangeSet r1, r2; - r1.clear(); r1.setRange(1,10); r1.clearValue(5); r1.setRange(11, 20); - r2.clear(); r2.setRange(1, 4); r2.setRange(6, 10); r2.setRange(10, 20); diff --git a/src/cpp/ripple/RangeSet.h b/src/cpp/ripple/RangeSet.h index 77ac65290d..12623ff020 100644 --- a/src/cpp/ripple/RangeSet.h +++ b/src/cpp/ripple/RangeSet.h @@ -43,8 +43,6 @@ public: void clearRange(uint32, uint32); - void clear() { mRanges.clear(); } - // iterator stuff iterator begin() { return mRanges.begin(); } iterator end() { return mRanges.end(); } diff --git a/src/cpp/ripple/RippleAddress.cpp b/src/cpp/ripple/RippleAddress.cpp index 93fdf7b607..6f90d140ab 100644 --- a/src/cpp/ripple/RippleAddress.cpp +++ b/src/cpp/ripple/RippleAddress.cpp @@ -758,8 +758,6 @@ bool RippleAddress::setSeedGeneric(const std::string& strText) bool bResult = true; uint128 uSeed; - ALPHABET = "rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"; - if (strText.empty() || naTemp.setAccountID(strText) || naTemp.setAccountPublic(strText) diff --git a/src/cpp/ripple/main.cpp b/src/cpp/ripple/main.cpp index 73667e3e21..d9e8281451 100644 --- a/src/cpp/ripple/main.cpp +++ b/src/cpp/ripple/main.cpp @@ -1,6 +1,7 @@ -#include + #include +#include #include #include #include