mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
stratum: possibility to change sql port
This commit is contained in:
parent
c375085dc1
commit
7729b5c2ef
3 changed files with 4 additions and 1 deletions
|
@ -12,7 +12,7 @@ void db_reconnect(YAAMP_DB *db)
|
||||||
mysql_init(&db->mysql);
|
mysql_init(&db->mysql);
|
||||||
for(int i=0; i<6; i++)
|
for(int i=0; i<6; i++)
|
||||||
{
|
{
|
||||||
MYSQL *p = mysql_real_connect(&db->mysql, g_sql_host, g_sql_username, g_sql_password, g_sql_database, 0, 0, 0);
|
MYSQL *p = mysql_real_connect(&db->mysql, g_sql_host, g_sql_username, g_sql_password, g_sql_database, g_sql_port, 0, 0);
|
||||||
if(p) break;
|
if(p) break;
|
||||||
|
|
||||||
stratumlog("%d, %s\n", i, mysql_error(&db->mysql));
|
stratumlog("%d, %s\n", i, mysql_error(&db->mysql));
|
||||||
|
|
|
@ -23,6 +23,7 @@ char g_sql_host[1024];
|
||||||
char g_sql_database[1024];
|
char g_sql_database[1024];
|
||||||
char g_sql_username[1024];
|
char g_sql_username[1024];
|
||||||
char g_sql_password[1024];
|
char g_sql_password[1024];
|
||||||
|
int g_sql_port = 3306;
|
||||||
|
|
||||||
char g_stratum_coin_include[256];
|
char g_stratum_coin_include[256];
|
||||||
char g_stratum_coin_exclude[256];
|
char g_stratum_coin_exclude[256];
|
||||||
|
@ -218,6 +219,7 @@ int main(int argc, char **argv)
|
||||||
strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL));
|
strcpy(g_sql_database, iniparser_getstring(ini, "SQL:database", NULL));
|
||||||
strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL));
|
strcpy(g_sql_username, iniparser_getstring(ini, "SQL:username", NULL));
|
||||||
strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL));
|
strcpy(g_sql_password, iniparser_getstring(ini, "SQL:password", NULL));
|
||||||
|
g_sql_port = iniparser_getint(ini, "SQL:port", 3306);
|
||||||
|
|
||||||
// optional coin filters (to mine only one on a special port or a test instance)
|
// optional coin filters (to mine only one on a special port or a test instance)
|
||||||
char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL);
|
char *coin_filter = iniparser_getstring(ini, "WALLETS:include", NULL);
|
||||||
|
|
|
@ -74,6 +74,7 @@ extern char g_sql_host[1024];
|
||||||
extern char g_sql_database[1024];
|
extern char g_sql_database[1024];
|
||||||
extern char g_sql_username[1024];
|
extern char g_sql_username[1024];
|
||||||
extern char g_sql_password[1024];
|
extern char g_sql_password[1024];
|
||||||
|
extern int g_sql_port;
|
||||||
|
|
||||||
extern char g_stratum_coin_include[256];
|
extern char g_stratum_coin_include[256];
|
||||||
extern char g_stratum_coin_exclude[256];
|
extern char g_stratum_coin_exclude[256];
|
||||||
|
|
Loading…
Add table
Reference in a new issue