Merge branch 'master' of github.com:jedmccaleb/NewCoin

This commit is contained in:
Arthur Britto
2013-01-13 11:08:54 -08:00
7 changed files with 14 additions and 11 deletions

View File

@@ -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())
{

View File

@@ -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());

View File

@@ -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

View File

@@ -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);

View File

@@ -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(); }

View File

@@ -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)

View File

@@ -1,6 +1,7 @@
#include <boost/asio.hpp>
#include <iostream>
#include <boost/asio.hpp>
#include <boost/foreach.hpp>
#include <boost/program_options.hpp>
#include <boost/test/included/unit_test.hpp>