Browse Source

Hush signed masks

dev
Duke Leto 4 years ago
parent
commit
12fabf7fd7
  1. 4
      src/hush.h
  2. 12
      src/init.cpp

4
src/hush.h

@ -725,7 +725,7 @@ int32_t komodo_voutupdate(bool fJustCheck,int32_t *isratificationp,int32_t notar
if ( signedfp == 0 )
{
char fname[512];
hush_statefname(fname,SMART_CHAIN_SYMBOL,(char *)"signedmasks");
hush_statefname(fname,SMART_CHAIN_SYMBOL,(char *)"hushsignedmasks");
if ( (signedfp= fopen(fname,"rb+")) == 0 )
signedfp = fopen(fname,"wb");
else fseek(signedfp,0,SEEK_END);
@ -893,7 +893,7 @@ int32_t hush_connectblock(bool fJustCheck, CBlockIndex *pindex,CBlock& block)
if ( signedfp == 0 )
{
char fname[512];
hush_statefname(fname,SMART_CHAIN_SYMBOL,(char *)"signedmasks");
hush_statefname(fname,SMART_CHAIN_SYMBOL,(char *)"hushsignedmasks");
if ( (signedfp= fopen(fname,"rb+")) == 0 )
signedfp = fopen(fname,"wb");
else fseek(signedfp,0,SEEK_END);

12
src/init.cpp

@ -1760,18 +1760,18 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
delete pblocktree;
delete pnotarisations;
pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex, dbCompression, dbMaxOpenFiles);
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex, dbCompression, dbMaxOpenFiles);
pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
pcoinsTip = new CCoinsViewCache(pcoinscatcher);
pnotarisations = new NotarisationDB(100*1024*1024, false, fReindex);
if (fReindex) {
boost::filesystem::remove(GetDataDir() / "hushstate");
boost::filesystem::remove(GetDataDir() / "signedmasks");
boost::filesystem::remove(GetDataDir() / "hushsignedmasks");
pblocktree->WriteReindexing(true);
fprintf(stderr, "%s: Deleted hushstate and signedmasks...\n", __FUNCTION__);
fprintf(stderr, "%s: Deleted hushstate and hushsignedmasks...\n", __FUNCTION__);
//If we're reindexing in prune mode, wipe away unusable block files and all undo data files
if (fPruneMode)

Loading…
Cancel
Save