stratum: fix for auxpow result:null on success

Some auxpow coins return error:null, result:null on success and are not reported correctly.

I have not found a coin which returns this on failure.
This commit is contained in:
Lavajumper 2018-12-26 10:58:12 -05:00 committed by Tanguy Pruvot
parent 47ec59b8e5
commit f7018873f5

View file

@ -140,6 +140,9 @@ bool coind_submitgetauxblock(YAAMP_COIND *coind, const char *hash, const char *b
json_value *json_result = json_get_object(json, "result"); json_value *json_result = json_get_object(json, "result");
bool b = json_result && json_result->type == json_boolean && json_result->u.boolean; bool b = json_result && json_result->type == json_boolean && json_result->u.boolean;
// some auxpow coins return error:null, result: null on success
if(!b)
b=json_result && json_result->type == json_null;
json_value_free(json); json_value_free(json);
return b; return b;