mirror of
https://github.com/GOSTSec/gostcoin
synced 2025-03-13 05:41:11 +00:00
eliminated IsDarknet
This commit is contained in:
parent
df2cdb295a
commit
21e0026e81
10
src/init.cpp
10
src/init.cpp
@ -714,12 +714,12 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
if (file) fclose(file);
|
if (file) fclose(file);
|
||||||
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
|
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
|
||||||
if (!lock.try_lock())
|
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))
|
if (GetBoolArg("-shrinkdebugfile", !fDebug))
|
||||||
ShrinkDebugFile();
|
ShrinkDebugFile();
|
||||||
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
|
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("I2P module version %s\n", FormatI2PNativeFullVersion().c_str());
|
||||||
printf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
|
printf("Using OpenSSL version %s\n", SSLeay_version(SSLEAY_VERSION));
|
||||||
if (!fLogTimestamps)
|
if (!fLogTimestamps)
|
||||||
@ -730,12 +730,10 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||||||
std::ostringstream strErrors;
|
std::ostringstream strErrors;
|
||||||
|
|
||||||
if (fDaemon)
|
if (fDaemon)
|
||||||
fprintf(stdout, "Anoncoin server starting\n");
|
fprintf(stdout, "Gostcoin server starting\n");
|
||||||
|
|
||||||
if (!GetBoolArg("-stfu", false)) {
|
if (!GetBoolArg("-stfu", false)) {
|
||||||
if (!IsBehindDarknet()) {
|
InitWarning("Gostcoin is running on clearnet!\n");
|
||||||
InitWarning("Anoncoin is running on clearnet!\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nScriptCheckThreads) {
|
if (nScriptCheckThreads) {
|
||||||
|
17
src/net.cpp
17
src/net.cpp
@ -124,15 +124,6 @@ bool GetLocal(CService& addr, const CNetAddr *paddrPeer)
|
|||||||
return nBestScore >= 0;
|
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 IsI2POnly()
|
||||||
{
|
{
|
||||||
bool i2pOnly = false;
|
bool i2pOnly = false;
|
||||||
@ -156,14 +147,6 @@ bool IsI2PEnabled()
|
|||||||
return false;
|
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
|
// get best local address for a particular peer as a CAddress
|
||||||
CAddress GetLocalAddress(const CNetAddr *paddrPeer)
|
CAddress GetLocalAddress(const CNetAddr *paddrPeer)
|
||||||
|
@ -50,8 +50,6 @@ bool BindListenNativeI2P(SOCKET& hSocket);
|
|||||||
bool IsI2POnly();
|
bool IsI2POnly();
|
||||||
bool IsI2PEnabled();
|
bool IsI2PEnabled();
|
||||||
|
|
||||||
bool IsDarknetOnly();
|
|
||||||
bool IsBehindDarknet();
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
@ -347,16 +347,6 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
|
|||||||
labelI2POnly->setText("I2P");
|
labelI2POnly->setText("I2P");
|
||||||
labelI2POnly->setToolTip(tr("Wallet is using I2P-network only"));
|
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
|
else
|
||||||
{
|
{
|
||||||
labelI2POnly->setText("CLR");
|
labelI2POnly->setText("CLR");
|
||||||
|
@ -149,17 +149,6 @@ bool ClientModel::isI2POnly() const
|
|||||||
return IsI2POnly();
|
return IsI2POnly();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ClientModel::isDarknetOnly() const
|
|
||||||
{
|
|
||||||
return IsDarknetOnly();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ClientModel::isBehindDarknet() const
|
|
||||||
{
|
|
||||||
return IsBehindDarknet();
|
|
||||||
}
|
|
||||||
|
|
||||||
QString ClientModel::getB32Address(const QString& destination) const
|
QString ClientModel::getB32Address(const QString& destination) const
|
||||||
{
|
{
|
||||||
return QString::fromStdString(I2PSession::GenerateB32AddressFromDestination(destination.toStdString()));
|
return QString::fromStdString(I2PSession::GenerateB32AddressFromDestination(destination.toStdString()));
|
||||||
|
@ -65,9 +65,6 @@ public:
|
|||||||
QString getPrivateI2PKey() const;
|
QString getPrivateI2PKey() const;
|
||||||
bool isI2PAddressGenerated() const;
|
bool isI2PAddressGenerated() const;
|
||||||
bool isI2POnly() const;
|
bool isI2POnly() const;
|
||||||
bool isTorOnly() const;
|
|
||||||
bool isDarknetOnly() const;
|
|
||||||
bool isBehindDarknet() const;
|
|
||||||
QString getB32Address(const QString& destination) const;
|
QString getB32Address(const QString& destination) const;
|
||||||
void generateI2PDestination(QString& pub, QString& priv) const;
|
void generateI2PDestination(QString& pub, QString& priv) const;
|
||||||
// I2PSession& getI2PSession() const; // ??
|
// I2PSession& getI2PSession() const; // ??
|
||||||
|
Loading…
x
Reference in New Issue
Block a user