1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

pool: introduce get_pool_user() for simpler opt_incognito use.

Use immediately.
This commit is contained in:
Noel Maersk 2014-02-28 22:17:54 +02:00
parent bd6766f231
commit 934c4f5f14
2 changed files with 8 additions and 0 deletions

6
pool.c
View File

@ -29,6 +29,7 @@
#include "config.h"
#include "miner.h"
#include "pool.h"
#include <stdlib.h>
#include <stdint.h>
@ -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;
}

2
pool.h
View File

@ -4,7 +4,9 @@
#include "miner.h"
#define POOL_NAME_INCOGNITO "<incognito>"
#define POOL_USER_INCOGNITO "<incognito>"
extern char* get_pool_name(struct pool *pool);
extern char* get_pool_user(struct pool *pool);
#endif /* POOL_H */