X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=blobdiff_plain;f=src%2Fmain.cpp;h=e957e634a4266d03769550f402878055b20fab76;hp=dee31c47cedd2dd4e3a54bf421add2960db1d991;hb=adb8391acdf671640adb1e8be564e68b254fca69;hpb=5d0ece51961598251142744ac8e85a5d725e020e diff --git a/src/main.cpp b/src/main.cpp index dee31c4..e957e63 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ #include "alert.h" #include "checkpoints.h" #include "db.h" +#include "txdb.h" #include "net.h" #include "init.h" #include "ui_interface.h" @@ -75,6 +76,10 @@ const string strMessageMagic = "NovaCoin Signed Message:\n"; int64 nTransactionFee = MIN_TX_FEE; bool fStakeUsePooledKeys = false; +// Used during database migration. +bool fDisableSignatureChecking = false; + + ////////////////////////////////////////////////////////////////////////////// // // dispatching functions @@ -2094,8 +2099,6 @@ bool CBlock::AddToBlockIndex(unsigned int nFile, unsigned int nBlockPos) if (!SetBestChain(txdb, pindexNew)) return false; - txdb.Close(); - if (pindexNew == pindexBest) { // Notify UI to display prev block's coinbase if it was ours @@ -2868,7 +2871,7 @@ void PrintBlockTree() } } -bool LoadExternalBlockFile(FILE* fileIn) +bool LoadExternalBlockFile(FILE* fileIn, ExternalBlockFileProgress *progress) { int64 nStart = GetTimeMillis(); @@ -2917,6 +2920,8 @@ bool LoadExternalBlockFile(FILE* fileIn) nPos += 4 + nSize; } } + if (progress != NULL) + (*progress)(4 + nSize); } } catch (std::exception &e) {