mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 07:39:08 +01:00
Merge branch '0.5.x' into 0.6.0.x
Conflicts: src/main.cpp
This commit is contained in:
16
src/db.cpp
16
src/db.cpp
@@ -405,9 +405,15 @@ bool CTxDB::ReadOwnerTxes(uint160 hash160, int nMinHeight, vector<CTransaction>&
|
||||
string strType;
|
||||
uint160 hashItem;
|
||||
CDiskTxPos pos;
|
||||
ssKey >> strType >> hashItem >> pos;
|
||||
int nItemHeight;
|
||||
ssValue >> nItemHeight;
|
||||
|
||||
try {
|
||||
ssKey >> strType >> hashItem >> pos;
|
||||
ssValue >> nItemHeight;
|
||||
}
|
||||
catch (std::exception &e) {
|
||||
return error("%s() : deserialize error", __PRETTY_FUNCTION__);
|
||||
}
|
||||
|
||||
// Read transaction
|
||||
if (strType != "owner" || hashItem != hash160)
|
||||
@@ -527,6 +533,8 @@ bool CTxDB::LoadBlockIndex()
|
||||
return false;
|
||||
|
||||
// Unserialize
|
||||
|
||||
try {
|
||||
string strType;
|
||||
ssKey >> strType;
|
||||
if (strType == "blockindex")
|
||||
@@ -558,6 +566,10 @@ bool CTxDB::LoadBlockIndex()
|
||||
{
|
||||
break;
|
||||
}
|
||||
} // try
|
||||
catch (std::exception &e) {
|
||||
return error("%s() : deserialize error", __PRETTY_FUNCTION__);
|
||||
}
|
||||
}
|
||||
pcursor->close();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user