mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
stratum: fix superblock script order
was not easy to code without the future wallet code to test it ;)
This commit is contained in:
parent
d428130df3
commit
db7a145c0b
1 changed files with 6 additions and 6 deletions
|
@ -298,15 +298,15 @@ void coinbase_create(YAAMP_COIND *coind, YAAMP_JOB_TEMPLATE *templ, json_value *
|
|||
base58_decode(payee, script_payee);
|
||||
bool superblock_use_p2sh = (strcmp(coind->symbol, "MAC") == 0);
|
||||
if(superblock_use_p2sh) {
|
||||
char eamount[32];
|
||||
char coinb2_part[512] = { 0 };
|
||||
char coinb2_len[4] = { 0 };
|
||||
char eamount[32] = { 0 };
|
||||
char coinb2_part[256];
|
||||
char coinb2_len[4];
|
||||
sprintf(coinb2_part, "a9%02x%s87", (unsigned int)(strlen(script_payee) >> 1) & 0xFF, script_payee);
|
||||
sprintf(coinb2_len, "%02x", (unsigned int)(strlen(coinb2_part) >> 1) & 0xFF);
|
||||
encode_tx_value(eamount, amount);
|
||||
strcat(templ->coinb2, eamount);
|
||||
strcat(templ->coinb2, coinb2_len);
|
||||
strcat(templ->coinb2, coinb2_part);
|
||||
strcat(script_dests, eamount);
|
||||
strcat(script_dests, coinb2_len);
|
||||
strcat(script_dests, coinb2_part);
|
||||
} else {
|
||||
job_pack_tx(coind, script_dests, amount, script_payee);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue