mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Use singleton block tree database instance
This commit is contained in:
@@ -79,8 +79,10 @@ void Shutdown(void* parg)
|
||||
{
|
||||
LOCK(cs_main);
|
||||
pcoinsTip->Flush();
|
||||
pblocktree->Flush();
|
||||
delete pcoinsTip;
|
||||
delete pcoinsdbview;
|
||||
delete pblocktree;
|
||||
}
|
||||
bitdb.Flush(true);
|
||||
boost::filesystem::remove(GetPidFile());
|
||||
@@ -650,6 +652,7 @@ bool AppInit2()
|
||||
uiInterface.InitMessage(_("Loading block index..."));
|
||||
printf("Loading block index...\n");
|
||||
nStart = GetTimeMillis();
|
||||
pblocktree = new CBlockTreeDB("cr+");
|
||||
pcoinsdbview = new CCoinsViewDB();
|
||||
pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user