decred: handle new block header stake version in coinb2

This commit is contained in:
Tanguy Pruvot 2017-04-23 16:12:40 +02:00
parent 9322d7e1bc
commit dcaf083ccf
4 changed files with 10 additions and 7 deletions

View file

@ -74,13 +74,14 @@ static void create_decred_header(YAAMP_JOB_TEMPLATE *templ, YAAMP_JOB_VALUES *ou
uint32_t size;
uint32_t ntime;
uint32_t nonce;
unsigned char extra[36];
unsigned char extra[32];
uint32_t stakever;
uint32_t hashtag[3];
} header;
memcpy(&header, templ->header, sizeof(header));
memset(header.extra, 0, 36);
memset(header.extra, 0, 32);
sscanf(nonce, "%08x", &header.nonce);
if (strcmp(vote, "")) {

View file

@ -114,7 +114,8 @@ static int decred_parse_header(YAAMP_JOB_TEMPLATE *templ, const char *header_hex
uint32_t size;
uint32_t ntime;
uint32_t nonce;
unsigned char extra[36];
unsigned char extra[32];
uint32_t stakever;
uint32_t hashtag[3];
} header;
@ -195,7 +196,8 @@ retry:
// bypass coinbase and merkle for now... send without nonce/extradata
const unsigned char *hdr = (unsigned char *) &templ->header[36];
hexlify(templ->coinb1, hdr, 192 - 80);
strcpy(templ->coinb2, "");
const unsigned char *sfx = (unsigned char *) &templ->header[176];
hexlify(templ->coinb2, sfx, 180 - 176); // stake version
vector<string> txhashes;
txhashes.push_back("");

View file

@ -1,6 +1,6 @@
[TCP]
server = yaamp.com
port = 5744
port = 3252
password = tu8tu5
[SQL]
@ -11,6 +11,6 @@ password = patofpaq
[STRATUM]
algo = decred
difficulty = 0.5
difficulty = 1
max_ttf = 1000000000

View file

@ -205,7 +205,7 @@ function getAlgoPort($algo)
// 5555 to 5683 reserved
'blake' => 5733,
'blakecoin' => 5743,
'decred' => 5744,
'decred' => 3252,
'vanilla' => 5755,
'blake2s' => 5766,
'penta' => 5833,