Browse Source

rename to gostcoin

pull/5/head
orignal 8 years ago
parent
commit
233563e09b
  1. 6
      gostcoin-qt.pro
  2. 14
      src/init.cpp
  3. 12
      src/main.cpp
  4. 12
      src/makefile.unix
  5. 10
      src/qt/gostcoin.cpp
  6. 14
      src/util.cpp

6
unioncoin-qt.pro → gostcoin-qt.pro

@ -1,6 +1,6 @@
TEMPLATE = app TEMPLATE = app
TARGET = unioncoin-qt TARGET = gostcoin-qt
macx:TARGET = "Unioncoin-Qt" macx:TARGET = "GOSTcoin-Qt"
VERSION = 0.8.5.6 VERSION = 0.8.5.6
INCLUDEPATH += src src/json src/qt i2psam i2pd INCLUDEPATH += src src/json src/qt i2psam i2pd
QT += core gui network QT += core gui network
@ -226,7 +226,7 @@ HEADERS += src/qt/bitcoingui.h \
src/qt/i2poptionswidget.h \ src/qt/i2poptionswidget.h \
src/qt/setupdarknet.h src/qt/setupdarknet.h
SOURCES += src/qt/unioncoin.cpp \ SOURCES += src/qt/gostcoin.cpp \
src/qt/bitcoingui.cpp \ src/qt/bitcoingui.cpp \
src/qt/transactiontablemodel.cpp \ src/qt/transactiontablemodel.cpp \
src/qt/addresstablemodel.cpp \ src/qt/addresstablemodel.cpp \

14
src/init.cpp

@ -177,7 +177,7 @@ void HandleSIGHUP(int)
#if !defined(QT_GUI) #if !defined(QT_GUI)
bool AppInit(int argc, char* argv[]) bool AppInit(int argc, char* argv[])
{ {
i2p::api::InitI2P (argc, argv, "unioncoin"); i2p::api::InitI2P (argc, argv, "gostcoin");
boost::thread_group threadGroup; boost::thread_group threadGroup;
boost::thread* detectShutdownThread = NULL; boost::thread* detectShutdownThread = NULL;
@ -199,12 +199,12 @@ bool AppInit(int argc, char* argv[])
if (mapArgs.count("-?") || mapArgs.count("--help")) if (mapArgs.count("-?") || mapArgs.count("--help"))
{ {
// First part of help message is specific to bitcoind / RPC client // First part of help message is specific to bitcoind / RPC client
std::string strUsage = _("Anoncoin version") + " " + FormatFullVersion() + "\n\n" + std::string strUsage = _("GOSTcoin version") + " " + FormatFullVersion() + "\n\n" +
_("Usage:") + "\n" + _("Usage:") + "\n" +
" anoncoind [options] " + "\n" + " gostcoind [options] " + "\n" +
" anoncoind [options] <command> [params] " + _("Send command to -server or anoncoind") + "\n" + " gostcoind [options] <command> [params] " + _("Send command to -server or gostcoind") + "\n" +
" anoncoind [options] help " + _("List commands") + "\n" + " gostcoind [options] help " + _("List commands") + "\n" +
" anoncoind [options] help <command> " + _("Get help for a command") + "\n"; " gostcoind [options] help <command> " + _("Get help for a command") + "\n";
strUsage += "\n" + HelpMessage(); strUsage += "\n" + HelpMessage();
@ -436,7 +436,7 @@ struct CImportingNow
void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
{ {
RenameThread("anoncoin-loadblk"); RenameThread("gostcoin-loadblk");
// -reindex // -reindex
if (fReindex) { if (fReindex) {

12
src/main.cpp

@ -4718,11 +4718,11 @@ bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
return true; return true;
} }
void static UnioncoinMiner(CWallet *pwallet) void static GostcoinMiner(CWallet *pwallet)
{ {
printf("UnioncoinMiner started\n"); printf("GostcoinMiner started\n");
SetThreadPriority(THREAD_PRIORITY_LOWEST); SetThreadPriority(THREAD_PRIORITY_LOWEST);
RenameThread("unioncoin-miner"); RenameThread("gostcoin-miner");
// Each thread has its own key and counter // Each thread has its own key and counter
CReserveKey reservekey(pwallet); CReserveKey reservekey(pwallet);
@ -4745,7 +4745,7 @@ void static UnioncoinMiner(CWallet *pwallet)
CBlock *pblock = &pblocktemplate->block; CBlock *pblock = &pblocktemplate->block;
IncrementExtraNonce(pblock, pindexPrev, nExtraNonce); IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
printf("Running UnioncoinMiner with %"PRIszu" transactions in block (%u bytes)\n", pblock->vtx.size(), printf("Running GostcoinMiner with %"PRIszu" transactions in block (%u bytes)\n", pblock->vtx.size(),
::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION)); ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
// //
@ -4820,7 +4820,7 @@ void static UnioncoinMiner(CWallet *pwallet)
} } } }
catch (boost::thread_interrupted) catch (boost::thread_interrupted)
{ {
printf("UnioncoinMiner terminated\n"); printf("GostcoinMiner terminated\n");
throw; throw;
} }
} }
@ -4846,7 +4846,7 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet)
minerThreads = new boost::thread_group(); minerThreads = new boost::thread_group();
for (int i = 0; i < nThreads; i++) for (int i = 0; i < nThreads; i++)
minerThreads->create_thread(boost::bind(&UnioncoinMiner, pwallet)); minerThreads->create_thread(boost::bind(&GostcoinMiner, pwallet));
} }
// Amount compression: // Amount compression:

12
src/makefile.unix

@ -158,10 +158,10 @@ OBJS_SSE2= obj/scrypt-sse2.o
OBJS += $(OBJS_SSE2) OBJS += $(OBJS_SSE2)
endif endif
all: unioncoind all: gostcoind
test check: test_unioncoin FORCE test check: test_gostcoin FORCE
./test_unioncoin ./test_gostcoin
# #
# LevelDB support # LevelDB support
@ -196,7 +196,7 @@ obj/%.o: %.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
unioncoind: $(OBJS:obj/%=obj/%) gostcoind: $(OBJS:obj/%=obj/%)
$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
@ -208,11 +208,11 @@ obj-test/%.o: test/%.cpp
-e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
rm -f $(@:%.o=%.d) rm -f $(@:%.o=%.d)
test_unioncoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) test_gostcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
$(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
clean: clean:
-rm -f anoncoind test_anoncoin -rm -f gostcoind test_gostcoin
-rm -f obj/*.o -rm -f obj/*.o
-rm -f obj-test/*.o -rm -f obj-test/*.o
-rm -f obj/*.P -rm -f obj/*.P

10
src/qt/unioncoin.cpp → src/qt/gostcoin.cpp

@ -162,7 +162,7 @@ int main(int argc, char *argv[])
{ {
// Command-line options take precedence: // Command-line options take precedence:
ParseParameters(argc, argv); ParseParameters(argc, argv);
i2p::api::InitI2P (argc, argv, "unioncoin"); i2p::api::InitI2P (argc, argv, "gostcoin");
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
// Internal string conversion is all UTF-8 // Internal string conversion is all UTF-8
@ -205,12 +205,12 @@ int main(int argc, char *argv[])
// Application identification (must be set before OptionsModel is initialized, // Application identification (must be set before OptionsModel is initialized,
// as it is used to locate QSettings) // as it is used to locate QSettings)
QApplication::setOrganizationName("Unioncoin"); QApplication::setOrganizationName("GOSTSec");
QApplication::setOrganizationDomain("unioncoin.net"); QApplication::setOrganizationDomain("gostcoin.net");
if(GetBoolArg("-testnet")) // Separate UI settings for testnet if(GetBoolArg("-testnet")) // Separate UI settings for testnet
QApplication::setApplicationName("Unioncoin-Qt-testnet"); QApplication::setApplicationName("GOSTcoin-Qt-testnet");
else else
QApplication::setApplicationName("Unioncoin-Qt"); QApplication::setApplicationName("GOSTcoin-Qt");
// ... then GUI settings: // ... then GUI settings:
OptionsModel optionsModel; OptionsModel optionsModel;

14
src/util.cpp

@ -1014,7 +1014,7 @@ bool writeFirstConfig(bool i2pOnlyEnabled, bool torOnlyEnabled, bool i2pEnabled,
pt.put("proxy", "127.0.0.1:9050"); pt.put("proxy", "127.0.0.1:9050");
unsigned char rand_pwd[32]; unsigned char rand_pwd[32];
RAND_bytes(rand_pwd, 32); RAND_bytes(rand_pwd, 32);
pt.put("rpcuser", "unioncoinrpc"); pt.put("rpcuser", "gostcoinrpc");
pt.put("rpcpassword", EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str()); pt.put("rpcpassword", EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32).c_str());
pt.put("daemon", 1); pt.put("daemon", 1);
pt.put("server", 1); pt.put("server", 1);
@ -1035,7 +1035,7 @@ static std::string FormatException(std::exception* pex, const char* pszThread)
char pszModule[MAX_PATH] = ""; char pszModule[MAX_PATH] = "";
GetModuleFileNameA(NULL, pszModule, sizeof(pszModule)); GetModuleFileNameA(NULL, pszModule, sizeof(pszModule));
#else #else
const char* pszModule = "unioncoin"; const char* pszModule = "gostcoin";
#endif #endif
if (pex) if (pex)
return strprintf( return strprintf(
@ -1077,7 +1077,7 @@ boost::filesystem::path GetDefaultDataDir()
// Unix: ~/.bitcoin // Unix: ~/.bitcoin
#ifdef WIN32 #ifdef WIN32
// Windows // Windows
return GetSpecialFolderPath(CSIDL_APPDATA) / "Unioncoin"; return GetSpecialFolderPath(CSIDL_APPDATA) / "Gostcoin";
#else #else
fs::path pathRet; fs::path pathRet;
char* pszHome = getenv("HOME"); char* pszHome = getenv("HOME");
@ -1089,10 +1089,10 @@ boost::filesystem::path GetDefaultDataDir()
// Mac // Mac
pathRet /= "Library/Application Support"; pathRet /= "Library/Application Support";
fs::create_directory(pathRet); fs::create_directory(pathRet);
return pathRet / "Unioncoin"; return pathRet / "Gostcoin";
#else #else
// Unix // Unix
return pathRet / ".unioncoin"; return pathRet / ".gostcoin";
#endif #endif
#endif #endif
} }
@ -1133,7 +1133,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
boost::filesystem::path GetConfigFile() boost::filesystem::path GetConfigFile()
{ {
boost::filesystem::path pathConfigFile(GetArg("-conf", "unioncoin.conf")); boost::filesystem::path pathConfigFile(GetArg("-conf", "gostcoin.conf"));
if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile; if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile;
return pathConfigFile; return pathConfigFile;
} }
@ -1167,7 +1167,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
boost::filesystem::path GetPidFile() boost::filesystem::path GetPidFile()
{ {
boost::filesystem::path pathPidFile(GetArg("-pid", "unioncoind.pid")); boost::filesystem::path pathPidFile(GetArg("-pid", "gostcoind.pid"));
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
return pathPidFile; return pathPidFile;
} }

Loading…
Cancel
Save