Revert "stratum: handle ismine check moved in getaddressinfo"

most wallets are not ready for that...

This reverts commit afc80e2a68.
This commit is contained in:
Tanguy Pruvot 2018-05-25 15:48:33 +02:00
parent afc80e2a68
commit c72dd91511
3 changed files with 3 additions and 5 deletions

View file

@ -114,8 +114,7 @@ bool coind_validate_address(YAAMP_COIND *coind)
char params[YAAMP_SMALLBUFSIZE]; char params[YAAMP_SMALLBUFSIZE];
sprintf(params, "[\"%s\"]", coind->wallet); sprintf(params, "[\"%s\"]", coind->wallet);
// assume, if the wallet has dropped getinfo, that it use the new getaddressinfo rpc for ismine and account json_value *json = rpc_call(&coind->rpc, "validateaddress", params);
json_value *json = rpc_call(&coind->rpc, coind->hasgetinfo ? "validateaddress" : "getaddressinfo", params);
if(!json) return false; if(!json) return false;
json_value *json_result = json_get_object(json, "result"); json_value *json_result = json_get_object(json, "result");

View file

@ -69,7 +69,7 @@ public:
bool hasmasternodes; bool hasmasternodes;
bool oldmasternodes; bool oldmasternodes;
bool multialgos; // pow_hash field (or mined_hash) bool multialgos; // pow_hash field (or mined_hash)
bool hasgetinfo;
bool usesegwit; bool usesegwit;
char commitment[128]; char commitment[128];
char witness_magic[16]; char witness_magic[16];

View file

@ -193,7 +193,7 @@ void db_update_coinds(YAAMP_DB *db)
db_query(db, "SELECT id, name, rpchost, rpcport, rpcuser, rpcpasswd, rpcencoding, master_wallet, reward, price, " db_query(db, "SELECT id, name, rpchost, rpcport, rpcuser, rpcpasswd, rpcencoding, master_wallet, reward, price, "
"hassubmitblock, txmessage, enable, auto_ready, algo, pool_ttf, charity_address, charity_amount, charity_percent, " "hassubmitblock, txmessage, enable, auto_ready, algo, pool_ttf, charity_address, charity_amount, charity_percent, "
"reward_mul, symbol, auxpow, actual_ttf, network_ttf, usememorypool, hasmasternodes, algo, symbol2, " "reward_mul, symbol, auxpow, actual_ttf, network_ttf, usememorypool, hasmasternodes, algo, symbol2, "
"rpccurl, rpcssl, rpccert, account, multialgos, max_miners, max_shares, usesegwit, hasgetinfo " "rpccurl, rpcssl, rpccert, account, multialgos, max_miners, max_shares, usesegwit "
"FROM coins WHERE enable AND auto_ready AND algo='%s' ORDER BY index_avg", g_stratum_algo); "FROM coins WHERE enable AND auto_ready AND algo='%s' ORDER BY index_avg", g_stratum_algo);
MYSQL_RES *result = mysql_store_result(&db->mysql); MYSQL_RES *result = mysql_store_result(&db->mysql);
@ -304,7 +304,6 @@ void db_update_coinds(YAAMP_DB *db)
if(row[33] && atoi(row[33]) > 0) g_stratum_max_cons = atoi(row[33]); if(row[33] && atoi(row[33]) > 0) g_stratum_max_cons = atoi(row[33]);
if(row[34] && atol(row[34]) > 0) g_max_shares = atol(row[34]); if(row[34] && atol(row[34]) > 0) g_max_shares = atol(row[34]);
if(row[35]) coind->usesegwit = atoi(row[35]) > 0; if(row[35]) coind->usesegwit = atoi(row[35]) > 0;
if(row[36]) coind->hasgetinfo = atoi(row[36]) > 0;
if(coind->usesegwit) g_stratum_segwit = true; if(coind->usesegwit) g_stratum_segwit = true;