Skip to content

Commit

Permalink
add: newcoin: LightBit (LITB)
Browse files Browse the repository at this point in the history
  • Loading branch information
decryp2kanon committed Mar 19, 2020
1 parent eae0dc3 commit f28073f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ sugarmaker_SOURCES = elist.h miner.h compat.h \
YespowerSugar.c \
YespowerIso.c \
YespowerNull.c \
YespowerUrx.c
YespowerUrx.c \
YespowerLitb.c

sugarmaker_LDFLAGS = $(PTHREAD_FLAGS)
sugarmaker_LDADD = @LIBCURL@ @JANSSON_LIBS@ @PTHREAD_LIBS@ @WS2_LIBS@
Expand Down
12 changes: 12 additions & 0 deletions cpu-miner.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ enum algos {
ALGO_ISO_YESPOWER_1_0_1,
ALGO_NULL_YESPOWER_1_0_1,
ALGO_URX_YESPOWER_1_0_1,
ALGO_LITB_YESPOWER_1_0_1,
};

static const char *algo_names[] = {
[ALGO_SUGAR_YESPOWER_1_0_1] = "YespowerSugar",
[ALGO_ISO_YESPOWER_1_0_1] = "YespowerIso",
[ALGO_NULL_YESPOWER_1_0_1] = "YespowerNull",
[ALGO_URX_YESPOWER_1_0_1] = "YespowerUrx",
[ALGO_LITB_YESPOWER_1_0_1] = "YespowerLitb",
};

bool opt_debug = false;
Expand Down Expand Up @@ -176,6 +178,7 @@ Options:\n\
YespowerIso: IsotopeC\n\
YespowerNull: CranePay, Bellcoin, Veco, SwampCoin\n\
YespowerUrx: UraniumX\n\
YespowerLitb: LightBit\n\
-o, --url=URL URL of mining server\n\
-O, --userpass=U:P username:password pair for mining server\n\
-u, --user=USERNAME username for mining server\n\
Expand Down Expand Up @@ -1195,6 +1198,9 @@ static void *miner_thread(void *userdata)
case ALGO_URX_YESPOWER_1_0_1:
max64 = 499;
break;
case ALGO_LITB_YESPOWER_1_0_1:
max64 = 499;
break;
}
}
if (work.data[19] + max64 > end_nonce)
Expand Down Expand Up @@ -1232,6 +1238,12 @@ static void *miner_thread(void *userdata)
);
break;

case ALGO_LITB_YESPOWER_1_0_1:
rc = scanhash_litb_yespower(
thr_id, work.data, work.target, max_nonce, &hashes_done
);
break;

default:
/* should never happen */
goto out;
Expand Down
4 changes: 4 additions & 0 deletions miner.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ extern int scanhash_urx_yespower(int thr_id, uint32_t *pdata,
const uint32_t *ptarget,
uint32_t max_nonce, unsigned long *hashes_done);

extern int scanhash_litb_yespower(int thr_id, uint32_t *pdata,
const uint32_t *ptarget,
uint32_t max_nonce, unsigned long *hashes_done);

struct thr_info {
int id;
pthread_t pth;
Expand Down

0 comments on commit f28073f

Please sign in to comment.