Committing updates.

This commit is contained in:
Преподобный Ален
2025-11-28 19:09:33 +03:00
parent 86d04af716
commit 0becca9a6e
4 changed files with 13 additions and 12 deletions

View File

@@ -291,14 +291,13 @@ namespace Apostol {
m_SyncPeriod = StrToIntDef(Data[0].Trim().c_str(), BPS_DEFAULT_SYNC_PERIOD); m_SyncPeriod = StrToIntDef(Data[0].Trim().c_str(), BPS_DEFAULT_SYNC_PERIOD);
} }
} if (uid.Name.Length() >= 35 && uid.Name.SubString(0, 3) == BM_PREFIX) { } if (uid.Name.Length() >= 35 && uid.Name.SubString(0, 3) == BM_PREFIX) {
#ifdef _DEBUG
ServerList.AddPair(BPS_BM_DEBUG_ADDRESS, BPS_DEBUG_SERVER_URL);
#endif
CStringList urlList; CStringList urlList;
if (FindURLInLine(uid.Desc, urlList)) { if (FindURLInLine(uid.Desc, urlList)) {
for (int l = 0; l < urlList.Count(); l++) { for (int l = 0; l < urlList.Count(); l++) {
#ifndef _DEBUG
ServerList.AddPair(uid.Name, urlList[l]); ServerList.AddPair(uid.Name, urlList[l]);
#else
ServerList.AddPair(BPS_BM_SERVER_ADDRESS, BPS_SERVER_URL);
#endif
} }
} }
} else if (name.Find("bitcoin_key") != CString::npos) { } else if (name.Find("bitcoin_key") != CString::npos) {

View File

@@ -22,10 +22,13 @@ Author:
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
#define BPS_DEFAULT_SYNC_PERIOD 30 #define BPS_DEFAULT_SYNC_PERIOD 30
#define BPS_SERVER_PORT 4977 #define BPS_SERVER_PORT 80
#define BPS_SERVER_URL "http://localhost:4977" #define BPS_SERVER_URL "https://testnet.bitdeals.org"
#define BPS_BM_SERVER_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add" #define BPS_BM_SERVER_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add"
#define BPS_BM_DEBUG_ADDRESS "BM-2cXtL92m3CavBKx8qsV2LbZtAU3eQxW2rB"
#define BPS_DEBUG_SERVER_PORT 4977
#define BPS_DEBUG_SERVER_URL "http://localhost:4977"
#define BPS_BM_DEBUG_ADDRESS "BM-2cX8y9u9yEi3fdqQfndx9F6NdR5Hv79add"
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
#ifdef __cplusplus #ifdef __cplusplus

View File

@@ -69,7 +69,7 @@ namespace Apostol {
if (m_Servers.Count() == 0) { if (m_Servers.Count() == 0) {
#ifdef _DEBUG #ifdef _DEBUG
int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_SERVER_URL))); const int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_DEBUG_SERVER_URL)));
auto &Keys = m_Servers[index].Value().PGP(); auto &Keys = m_Servers[index].Value().PGP();
Keys.Add(CKeyContext(CString("PUBLIC"), CString())); Keys.Add(CKeyContext(CString("PUBLIC"), CString()));
Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString())); Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString()));

View File

@@ -68,19 +68,18 @@ namespace Apostol {
if (m_Servers.Count() == 0) { if (m_Servers.Count() == 0) {
#ifdef _DEBUG #ifdef _DEBUG
int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CClientContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_SERVER_URL))); const int index = m_Servers.AddPair(BPS_BM_DEBUG_ADDRESS, CClientContext(BPS_BM_DEBUG_ADDRESS, CLocation(BPS_DEBUG_SERVER_URL)));
auto &Keys = m_Servers[index].Value().PGP(); auto &Keys = m_Servers[index].Value().PGP();
Keys.Add(CKeyContext(CString("PUBLIC"), CString())); Keys.Add(CKeyContext(CString("PUBLIC"), CString()));
Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString())); Keys.Add(CKeyContext(CString(BPS_BM_DEBUG_ADDRESS), CString()));
#else
m_Servers.Add(m_DefaultServer);
#endif #endif
m_Servers.Add(m_DefaultServer);
} }
} }
//-------------------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------------------
CWebSocketClient *CWebSocketModule::GetWebSocketClient(CClientContext &Context) { CWebSocketClient *CWebSocketModule::GetWebSocketClient(CClientContext &Context) {
auto pClient = Context.ClientManager().Add(&Context, CLocation(Context.URL().Origin() + "/session/" + Context.Session())); const auto pClient = Context.ClientManager().Add(&Context, CLocation(Context.URL().Origin() + "/session/" + Context.Session()));
pClient->Session() = Context.Session(); pClient->Session() = Context.Session();