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

This commit is contained in:
Arthur Britto
2012-06-25 23:31:30 -07:00
27 changed files with 428 additions and 223 deletions

View File

@@ -18,6 +18,7 @@
#include "Wallet.h"
#include "BinaryFormats.h"
#include "LedgerTiming.h"
#include "HashPrefixes.h"
#include "Log.h"
Ledger::Ledger(const NewcoinAddress& masterID, uint64 startAmount) : mTotCoins(startAmount),
@@ -116,6 +117,7 @@ void Ledger::updateHash()
}
Serializer s(116);
s.add32(sHP_Ledger);
addRaw(s);
mHash = s.getSHA512Half();
mValidHash = true;
@@ -440,7 +442,7 @@ void Ledger::addJson(Json::Value& ret, int options)
void Ledger::setAcquiring(void)
{
if (!mTransactionMap || !mAccountStateMap) throw SHAMapException(InvalidMap);
if (!mTransactionMap || !mAccountStateMap) throw std::runtime_error("invalid map");
mTransactionMap->setSynching();
mAccountStateMap->setSynching();
}