From 5e7c389085abb8f05a6c253a0349b8aa513353cd Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 25 Jun 2012 09:12:54 -0700 Subject: [PATCH] Use new hash prefix. Remove SHAMapException --- src/Ledger.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ledger.cpp b/src/Ledger.cpp index 1ab8fb3d5c..9fca1d4854 100644 --- a/src/Ledger.cpp +++ b/src/Ledger.cpp @@ -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; @@ -438,7 +440,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(); }