Browse Source

Start implementing KMD Notarization for Hush

pull/132/head
Jonathan "Duke" Leto 6 years ago
parent
commit
0c2b212da2
  1. 10
      src/init.cpp
  2. 1225
      src/komodo_validation015.h
  3. 4
      src/main.cpp

10
src/init.cpp

@ -701,7 +701,7 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
}
/** Sanity checks
* Ensure that Bitcoin is running in a usable environment with all
* Ensure that Hush is running in a usable environment with all
* necessary library support.
*/
bool InitSanityCheck(void)
@ -764,7 +764,9 @@ bool AppInitServers(boost::thread_group& threadGroup)
return true;
}
/** Initialize bitcoin.
int32_t komodo_init();
/** Initialize Hush
* @pre Parameters should be parsed and config file should be read.
*/
bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
@ -915,6 +917,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (nFD - MIN_CORE_FILEDESCRIPTORS < nMaxConnections)
nMaxConnections = nFD - MIN_CORE_FILEDESCRIPTORS;
komodo_init();
// if using block pruning, then disable txindex
// also disable the wallet (for now, until SPV support is implemented in wallet)
if (GetArg("-prune", 0)) {
@ -1108,7 +1112,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (strWalletFile != boost::filesystem::basename(strWalletFile) + boost::filesystem::extension(strWalletFile))
return InitError(strprintf(_("Wallet %s resides outside data directory %s"), strWalletFile, strDataDir));
#endif
// Make sure only a single Bitcoin process is using the data directory.
// Make sure only a single Hush process is using the data directory.
boost::filesystem::path pathLockFile = GetDataDir() / ".lock";
FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist.
if (file) fclose(file);

1225
src/komodo_validation015.h

File diff suppressed because it is too large

4
src/main.cpp

@ -48,6 +48,9 @@ using namespace std;
#endif
char ASSETCHAINS_SYMBOL[65] = { "HUSH" };
#include "komodo_validation015.h"
/**
* Global state
*/
@ -2782,6 +2785,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
LogPrint("bench", " - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);
komodo_connectblock(pindexNew,*(CBlock *)&pblock);
return true;
}

Loading…
Cancel
Save