aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-24 10:06:10 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-24 10:06:58 +0100
commit6e7792003b5c520fcc81d223f07471d690594081 (patch)
treebf0b6cb7819af555448a4cc159220c349360e3db /src
parent086d7ec2b8c6ee352af820fe57908d43ec86f586 (diff)
parent96e5f61d6c53299d1d7d7428a943c4db2ecf73c9 (diff)
Merge pull request #3453
96e5f61 extend std::exception logging in txdb.cpp (Philip Kaufmann)
Diffstat (limited to 'src')
-rw-r--r--src/txdb.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 99deb31404..6ed0d18785 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -26,8 +26,8 @@ void static BatchWriteHashBestChain(CLevelDBBatch &batch, const uint256 &hash) {
CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe) {
}
-bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) {
- return db.Read(make_pair('c', txid), coins);
+bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) {
+ return db.Read(make_pair('c', txid), coins);
}
bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
@@ -37,7 +37,7 @@ bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
}
bool CCoinsViewDB::HaveCoins(const uint256 &txid) {
- return db.Exists(make_pair('c', txid));
+ return db.Exists(make_pair('c', txid));
}
uint256 CCoinsViewDB::GetBestBlock() {
@@ -131,7 +131,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
ssKey >> txhash;
ss << txhash;
ss << VARINT(coins.nVersion);
- ss << (coins.fCoinBase ? 'c' : 'n');
+ ss << (coins.fCoinBase ? 'c' : 'n');
ss << VARINT(coins.nHeight);
stats.nTransactions++;
for (unsigned int i=0; i<coins.vout.size(); i++) {
@@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
}
pcursor->Next();
} catch (std::exception &e) {
- return error("%s() : deserialize error", __PRETTY_FUNCTION__);
+ return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
}
}
delete pcursor;
@@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
break; // if shutdown requested or finished loading block index
}
} catch (std::exception &e) {
- return error("%s() : deserialize error", __PRETTY_FUNCTION__);
+ return error("%s : Deserialize or I/O error - %s", __PRETTY_FUNCTION__, e.what());
}
}
delete pcursor;