diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 90e890ebd..ce398c02d 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -53,7 +53,7 @@ void WaitForShutdown(boost::thread_group* threadGroup) // // Start // -extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY; +extern int32_t IS_KOMODO_NOTARY,USE_EXTERNAL_PUBKEY,ASSETCHAIN_INIT; extern std::string NOTARY_PUBKEY; bool AppInit(int argc, char* argv[]) @@ -95,6 +95,10 @@ bool AppInit(int argc, char* argv[]) void komodo_args(); fprintf(stderr,"call komodo_args\n"); komodo_args(); + while ( ASSETCHAIN_INIT == 0 ) + { + sleep(1); + } if (!boost::filesystem::is_directory(GetDataDir(false))) { fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str()); diff --git a/src/komodo_utils.h b/src/komodo_utils.h index f495865b8..31dbc4090 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1318,9 +1318,5 @@ void komodo_args() if ( ASSETCHAINS_SYMBOL[0] != 0 ) komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1); } else ASSETCHAINS_PORT = 8777; - while ( ASSETCHAIN_INIT == 0 ) - { - sleep(1); - } fprintf(stderr,"%s chain params initialized\n",ASSETCHAINS_SYMBOL); } \ No newline at end of file