|
|
@ -147,7 +147,12 @@ bool gen_gbtbase(connsock_t *cs, gbtbase_t *gbt) |
|
|
|
coinbase_aux = json_object_get(res_val, "coinbaseaux"); |
|
|
|
coinbase_aux = json_object_get(res_val, "coinbaseaux"); |
|
|
|
flags = json_string_value(json_object_get(coinbase_aux, "flags")); |
|
|
|
flags = json_string_value(json_object_get(coinbase_aux, "flags")); |
|
|
|
|
|
|
|
|
|
|
|
if (unlikely(!previousblockhash || !target || !version || !curtime || !bits || !coinbase_aux || !flags)) { |
|
|
|
if(!flags) { //bitcon core do not send coinbaseaux any more
|
|
|
|
|
|
|
|
flags = malloc(1*sizeof(char)); |
|
|
|
|
|
|
|
memset(flags, 0, 1*sizeof(char)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (unlikely(!previousblockhash || !target || !version || !curtime || !bits || !flags)) { |
|
|
|
LOGERR("JSON failed to decode GBT %s %s %d %d %s %s", previousblockhash, target, version, curtime, bits, flags); |
|
|
|
LOGERR("JSON failed to decode GBT %s %s %d %d %s %s", previousblockhash, target, version, curtime, bits, flags); |
|
|
|
goto out; |
|
|
|
goto out; |
|
|
|
} |
|
|
|
} |
|
|
|