test
This commit is contained in:
@@ -1302,6 +1302,8 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
{
|
{
|
||||||
static char myusername[512],mypassword[8192];
|
static char myusername[512],mypassword[8192];
|
||||||
FILE *fp; uint8_t buf2[33]; char fname[512],buf[128],username[512],password[8192]; uint32_t crc,r,r2,i;
|
FILE *fp; uint8_t buf2[33]; char fname[512],buf[128],username[512],password[8192]; uint32_t crc,r,r2,i;
|
||||||
|
if ( symbol != 0 && port != 0 )
|
||||||
|
{
|
||||||
r = (uint32_t)time(NULL);
|
r = (uint32_t)time(NULL);
|
||||||
r2 = OS_milliseconds();
|
r2 = OS_milliseconds();
|
||||||
memcpy(buf,&r,sizeof(r));
|
memcpy(buf,&r,sizeof(r));
|
||||||
@@ -1336,6 +1338,7 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
//fprintf(stderr,"myusername.(%s)\n",myusername);
|
//fprintf(stderr,"myusername.(%s)\n",myusername);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
strcpy(fname,GetDataDir().string().c_str());
|
strcpy(fname,GetDataDir().string().c_str());
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
while ( fname[strlen(fname)-1] != '\\' )
|
while ( fname[strlen(fname)-1] != '\\' )
|
||||||
@@ -1346,12 +1349,12 @@ void komodo_configfile(char *symbol,uint16_t port)
|
|||||||
fname[strlen(fname)-1] = 0;
|
fname[strlen(fname)-1] = 0;
|
||||||
strcat(fname,"komodo.conf");
|
strcat(fname,"komodo.conf");
|
||||||
#endif
|
#endif
|
||||||
//printf("KOMODO.(%s)\n",fname);
|
|
||||||
if ( (fp= fopen(fname,"rb")) != 0 )
|
if ( (fp= fopen(fname,"rb")) != 0 )
|
||||||
{
|
{
|
||||||
komodo_userpass(username,password,fp);
|
komodo_userpass(username,password,fp);
|
||||||
sprintf(KMDUSERPASS,"%s:%s",username,password);
|
sprintf(KMDUSERPASS,"%s:%s",username,password);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS);
|
||||||
} else printf("couldnt open.(%s)\n",fname);
|
} else printf("couldnt open.(%s)\n",fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1461,13 +1464,13 @@ void komodo_args()
|
|||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"Got datadir.(%s)\n",dirname);
|
//fprintf(stderr,"Got datadir.(%s)\n",dirname);
|
||||||
komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1);
|
|
||||||
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
if ( ASSETCHAINS_SYMBOL[0] != 0 )
|
||||||
{
|
{
|
||||||
int32_t komodo_baseid(char *origbase);
|
int32_t komodo_baseid(char *origbase);
|
||||||
extern int COINBASE_MATURITY;
|
extern int COINBASE_MATURITY;
|
||||||
|
komodo_configfile(ASSETCHAINS_SYMBOL,ASSETCHAINS_PORT + 1);
|
||||||
COINBASE_MATURITY = 1;
|
COINBASE_MATURITY = 1;
|
||||||
}
|
} else komodo_configfile(0,0);
|
||||||
ASSETCHAINS_NOTARIES = GetArg("-ac_notaries","");
|
ASSETCHAINS_NOTARIES = GetArg("-ac_notaries","");
|
||||||
komodo_assetchain_pubkeys((char *)ASSETCHAINS_NOTARIES.c_str());
|
komodo_assetchain_pubkeys((char *)ASSETCHAINS_NOTARIES.c_str());
|
||||||
iguana_rwnum(1,magic,sizeof(ASSETCHAINS_MAGIC),(void *)&ASSETCHAINS_MAGIC);
|
iguana_rwnum(1,magic,sizeof(ASSETCHAINS_MAGIC),(void *)&ASSETCHAINS_MAGIC);
|
||||||
|
|||||||
Reference in New Issue
Block a user