Permalink
Browse files

Move rescanfornames earlier

  • Loading branch information...
1 parent 8958a3e commit 5997a75044ab2d3338837ac8fef34cbcf1eea958 @khalahan khalahan committed May 31, 2012
Showing with 10 additions and 9 deletions.
  1. +10 −0 src/init.cpp
  2. +0 −9 src/rpc.cpp
View
@@ -14,6 +14,8 @@
using namespace std;
using namespace boost;
+void rescanfornames();
+
CWallet* pwalletMain;
//////////////////////////////////////////////////////////////////////////////
@@ -546,6 +548,14 @@ bool AppInit2(int argc, char* argv[])
RandAddSeedPerfmon();
+ filesystem::path nameindexfile = filesystem::path(GetDataDir()) / "nameindexfull.dat";
+ if (!filesystem::exists(nameindexfile))
+ {
+ //PrintConsole("Scanning blockchain for names to create fast index...");
+ rescanfornames();
+ //PrintConsole("\n");
+ }
+
if (!CreateThread(StartNode, NULL))
wxMessageBox("Error: CreateThread(StartNode) failed", "Bitcoin");
View
@@ -37,7 +37,6 @@ using namespace json_spirit;
void ThreadRPCServer2(void* parg);
typedef Value(*rpcfn_type)(const Array& params, bool fHelp);
extern map<string, rpcfn_type> mapCallTable;
-void rescanfornames();
Value sendtoaddress(const Array& params, bool fHelp);
@@ -2387,14 +2386,6 @@ void ThreadRPCServer2(void* parg)
{
printf("ThreadRPCServer started\n");
- filesystem::path nameindexfile = filesystem::path(GetDataDir()) / "nameindexfull.dat";
- if (!filesystem::exists(nameindexfile))
- {
- PrintConsole("Scanning blockchain for names to create fast index...");
- rescanfornames();
- PrintConsole("\n");
- }
-
if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "")
{
string strWhatAmI = "To use namecoind";

1 comment on commit 5997a75

rjquery commented on 5997a75 Oct 2, 2012

I think this commit is the cause of an error I'm getting when trying to build namecoind. I get this error "...init.cpp:555: undefined reference to rescanfornames();" and the compilation fails.

Please sign in to comment.