mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 01:44:23 +00:00
pool: introduce get_pool_user() for simpler opt_incognito use.
Use immediately.
This commit is contained in:
parent
bd6766f231
commit
934c4f5f14
6
pool.c
6
pool.c
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "miner.h"
|
#include "miner.h"
|
||||||
|
#include "pool.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@ -39,3 +40,8 @@ char* get_pool_name(struct pool *pool) {
|
|||||||
if (strcmp(pool->poolname, "") == 0) return pool->sockaddr_url;
|
if (strcmp(pool->poolname, "") == 0) return pool->sockaddr_url;
|
||||||
return pool->poolname;
|
return pool->poolname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* get_pool_user(struct pool *pool) {
|
||||||
|
if (opt_incognito) return POOL_USER_INCOGNITO;
|
||||||
|
return pool->rpc_user;
|
||||||
|
}
|
||||||
|
2
pool.h
2
pool.h
@ -4,7 +4,9 @@
|
|||||||
#include "miner.h"
|
#include "miner.h"
|
||||||
|
|
||||||
#define POOL_NAME_INCOGNITO "<incognito>"
|
#define POOL_NAME_INCOGNITO "<incognito>"
|
||||||
|
#define POOL_USER_INCOGNITO "<incognito>"
|
||||||
|
|
||||||
extern char* get_pool_name(struct pool *pool);
|
extern char* get_pool_name(struct pool *pool);
|
||||||
|
extern char* get_pool_user(struct pool *pool);
|
||||||
|
|
||||||
#endif /* POOL_H */
|
#endif /* POOL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user