Skip to content

Commit

Permalink
Revert "stratum: handle ismine check moved in getaddressinfo"
Browse files Browse the repository at this point in the history
most wallets are not ready for that...

This reverts commit afc80e2.
  • Loading branch information
tpruvot committed May 25, 2018
1 parent afc80e2 commit c72dd91
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions stratum/coind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ bool coind_validate_address(YAAMP_COIND *coind)
char params[YAAMP_SMALLBUFSIZE];
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, coind->hasgetinfo ? "validateaddress" : "getaddressinfo", params);
json_value *json = rpc_call(&coind->rpc, "validateaddress", params);
if(!json) return false;

json_value *json_result = json_get_object(json, "result");
Expand Down
2 changes: 1 addition & 1 deletion stratum/coind.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class YAAMP_COIND: public YAAMP_OBJECT
bool hasmasternodes;
bool oldmasternodes;
bool multialgos; // pow_hash field (or mined_hash)
bool hasgetinfo;

bool usesegwit;
char commitment[128];
char witness_magic[16];
Expand Down
3 changes: 1 addition & 2 deletions stratum/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, "
"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, "
"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);

MYSQL_RES *result = mysql_store_result(&db->mysql);
Expand Down Expand Up @@ -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[34] && atol(row[34]) > 0) g_max_shares = atol(row[34]);
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;

Expand Down

0 comments on commit c72dd91

Please sign in to comment.