Browse Source

eliminated IsDarknet

pull/5/head
orignal 8 years ago
parent
commit
21e0026e81
  1. 10
      src/init.cpp
  2. 17
      src/net.cpp
  3. 2
      src/net.h
  4. 10
      src/qt/bitcoingui.cpp
  5. 11
      src/qt/clientmodel.cpp
  6. 3
      src/qt/clientmodel.h

10
src/init.cpp

@ -714,12 +714,12 @@ bool AppInit2(boost::thread_group& threadGroup) @@ -714,12 +714,12 @@ bool AppInit2(boost::thread_group& threadGroup)
if (file) fclose(file);
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
if (!lock.try_lock())
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Anoncoin is probably already running."), strDataDir.c_str()));
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Gostcoin is probably already running."), strDataDir.c_str()));
if (GetBoolArg("-shrinkdebugfile", !fDebug))
ShrinkDebugFile();
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Anoncoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str());
printf("Gostcoin version %s (%s)\n", FormatFullVersion().c_str(), CLIENT_DATE.c_str());
printf("I2P module version %s\n", FormatI2PNativeFullVersion().c_str());
printf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
if (!fLogTimestamps)
@ -730,12 +730,10 @@ bool AppInit2(boost::thread_group& threadGroup) @@ -730,12 +730,10 @@ bool AppInit2(boost::thread_group& threadGroup)
std::ostringstream strErrors;
if (fDaemon)
fprintf(stdout, "Anoncoin server starting\n");
fprintf(stdout, "Gostcoin server starting\n");
if (!GetBoolArg("-stfu", false)) {
if (!IsBehindDarknet()) {
InitWarning("Anoncoin is running on clearnet!\n");
}
InitWarning("Gostcoin is running on clearnet!\n");
}
if (nScriptCheckThreads) {

17
src/net.cpp

@ -124,15 +124,6 @@ bool GetLocal(CService& addr, const CNetAddr *paddrPeer) @@ -124,15 +124,6 @@ bool GetLocal(CService& addr, const CNetAddr *paddrPeer)
return nBestScore >= 0;
}
bool IsDarknetOnly()
{
if (IsI2POnly())
return true;
if ((mapArgs.count("-proxy") && mapArgs["-proxy"] != "0") && (mapArgs.count("-i2p") && mapArgs["-i2p"] != "0"))
return true;
return false;
}
bool IsI2POnly()
{
bool i2pOnly = false;
@ -156,14 +147,6 @@ bool IsI2PEnabled() @@ -156,14 +147,6 @@ bool IsI2PEnabled()
return false;
}
bool IsBehindDarknet()
{
if (IsI2POnly())
return true;
if (IsDarknetOnly())
return true;
return false;
}
// get best local address for a particular peer as a CAddress
CAddress GetLocalAddress(const CNetAddr *paddrPeer)

2
src/net.h

@ -50,8 +50,6 @@ bool BindListenNativeI2P(SOCKET& hSocket); @@ -50,8 +50,6 @@ bool BindListenNativeI2P(SOCKET& hSocket);
bool IsI2POnly();
bool IsI2PEnabled();
bool IsDarknetOnly();
bool IsBehindDarknet();
enum
{

10
src/qt/bitcoingui.cpp

@ -347,16 +347,6 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel) @@ -347,16 +347,6 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
labelI2POnly->setText("I2P");
labelI2POnly->setToolTip(tr("Wallet is using I2P-network only"));
}
else if (clientModel->isDarknetOnly())
{
labelI2POnly->setText("I&T");
labelI2POnly->setToolTip(tr("Wallet is using both I2P and Tor network only (Darknet mode)"));
}
else if (clientModel->isBehindDarknet())
{
labelI2POnly->setText("ICT");
labelI2POnly->setToolTip(tr("Wallet is using both I2P and Tor network, but also Tor as a proxy"));
}
else
{
labelI2POnly->setText("CLR");

11
src/qt/clientmodel.cpp

@ -149,17 +149,6 @@ bool ClientModel::isI2POnly() const @@ -149,17 +149,6 @@ bool ClientModel::isI2POnly() const
return IsI2POnly();
}
bool ClientModel::isDarknetOnly() const
{
return IsDarknetOnly();
}
bool ClientModel::isBehindDarknet() const
{
return IsBehindDarknet();
}
QString ClientModel::getB32Address(const QString& destination) const
{
return QString::fromStdString(I2PSession::GenerateB32AddressFromDestination(destination.toStdString()));

3
src/qt/clientmodel.h

@ -65,9 +65,6 @@ public: @@ -65,9 +65,6 @@ public:
QString getPrivateI2PKey() const;
bool isI2PAddressGenerated() const;
bool isI2POnly() const;
bool isTorOnly() const;
bool isDarknetOnly() const;
bool isBehindDarknet() const;
QString getB32Address(const QString& destination) const;
void generateI2PDestination(QString& pub, QString& priv) const;
// I2PSession& getI2PSession() const; // ??

Loading…
Cancel
Save