@@ -26,8 +26,8 @@ void static BatchWriteHashBestChain(CLevelDBBatch &batch, const uint256 &hash) {
26
26
CCoinsViewDB::CCoinsViewDB (size_t nCacheSize, bool fMemory , bool fWipe ) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe) {
27
27
}
28
28
29
- bool CCoinsViewDB::GetCoins (const uint256 &txid, CCoins &coins) {
30
- return db.Read (make_pair (' c' , txid), coins);
29
+ bool CCoinsViewDB::GetCoins (const uint256 &txid, CCoins &coins) {
30
+ return db.Read (make_pair (' c' , txid), coins);
31
31
}
32
32
33
33
bool CCoinsViewDB::SetCoins (const uint256 &txid, const CCoins &coins) {
@@ -37,7 +37,7 @@ bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
37
37
}
38
38
39
39
bool CCoinsViewDB::HaveCoins (const uint256 &txid) {
40
- return db.Exists (make_pair (' c' , txid));
40
+ return db.Exists (make_pair (' c' , txid));
41
41
}
42
42
43
43
uint256 CCoinsViewDB::GetBestBlock () {
@@ -131,7 +131,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
131
131
ssKey >> txhash;
132
132
ss << txhash;
133
133
ss << VARINT (coins.nVersion );
134
- ss << (coins.fCoinBase ? ' c' : ' n' );
134
+ ss << (coins.fCoinBase ? ' c' : ' n' );
135
135
ss << VARINT (coins.nHeight );
136
136
stats.nTransactions ++;
137
137
for (unsigned int i=0 ; i<coins.vout .size (); i++) {
@@ -148,7 +148,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
148
148
}
149
149
pcursor->Next ();
150
150
} catch (std::exception &e) {
151
- return error (" %s() : deserialize error" , __PRETTY_FUNCTION__);
151
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
152
152
}
153
153
}
154
154
delete pcursor;
@@ -226,7 +226,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
226
226
break ; // if shutdown requested or finished loading block index
227
227
}
228
228
} catch (std::exception &e) {
229
- return error (" %s() : deserialize error" , __PRETTY_FUNCTION__);
229
+ return error (" %s : Deserialize or I/O error - %s " , __PRETTY_FUNCTION__, e. what () );
230
230
}
231
231
}
232
232
delete pcursor;
0 commit comments