return Write(string("strCheckpointPubKey"), strPubKey);
}
+bool CTxDB::ReadModifierUpgradeTime(unsigned int& nUpgradeTime)
+{
+ return Read(string("nUpgradeTime"), nUpgradeTime);
+}
+
+bool CTxDB::WriteModifierUpgradeTime(const unsigned int& nUpgradeTime)
+{
+ return Write(string("nUpgradeTime"), nUpgradeTime);
+}
+
CBlockIndex static * InsertBlockIndex(uint256 hash)
{
if (hash == 0)
CDiskBlockIndex diskindex;
ssValue >> diskindex;
+ uint256 blockHash = diskindex.GetBlockHash();
+
// Construct block index object
- CBlockIndex* pindexNew = InsertBlockIndex(diskindex.GetBlockHash());
+ CBlockIndex* pindexNew = InsertBlockIndex(blockHash);
pindexNew->pprev = InsertBlockIndex(diskindex.hashPrev);
pindexNew->pnext = InsertBlockIndex(diskindex.hashNext);
pindexNew->nFile = diskindex.nFile;
pindexNew->nNonce = diskindex.nNonce;
// Watch for genesis block
- if (pindexGenesisBlock == NULL && diskindex.GetBlockHash() == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
+ if (pindexGenesisBlock == NULL && blockHash == (!fTestNet ? hashGenesisBlock : hashGenesisBlockTestNet))
pindexGenesisBlock = pindexNew;
if (!pindexNew->CheckIndex())
}
} // try
catch (std::exception &e) {
- return error("%s() : deserialize error", __PRETTY_FUNCTION__);
+ return error("%s() : deserialize error", BOOST_CURRENT_FUNCTION);
}
}
pcursor->close();