diff --git a/pool.c b/pool.c index d5ba8330..03752097 100644 --- a/pool.c +++ b/pool.c @@ -29,6 +29,7 @@ #include "config.h" #include "miner.h" +#include "pool.h" #include #include @@ -39,3 +40,8 @@ char* get_pool_name(struct pool *pool) { if (strcmp(pool->poolname, "") == 0) return pool->sockaddr_url; return pool->poolname; } + +char* get_pool_user(struct pool *pool) { + if (opt_incognito) return POOL_USER_INCOGNITO; + return pool->rpc_user; +} diff --git a/pool.h b/pool.h index 30a5f197..8b7150b9 100644 --- a/pool.h +++ b/pool.h @@ -4,7 +4,9 @@ #include "miner.h" #define POOL_NAME_INCOGNITO "" +#define POOL_USER_INCOGNITO "" extern char* get_pool_name(struct pool *pool); +extern char* get_pool_user(struct pool *pool); #endif /* POOL_H */