diff --git a/.gitignore b/.gitignore index 5cb2be3fe..3ae3a23ab 100755 --- a/.gitignore +++ b/.gitignore @@ -262,3 +262,5 @@ Release/* build_win64_release/* DB/* + +iguana/exchanges/manychains diff --git a/iguana/dpow/dpow_rpc.c b/iguana/dpow/dpow_rpc.c index 40826d7d0..a436abc00 100755 --- a/iguana/dpow/dpow_rpc.c +++ b/iguana/dpow/dpow_rpc.c @@ -1167,7 +1167,7 @@ void dpow_issuer_voutupdate(struct dpow_info *dp,char *symbol,int32_t isspecial, if ( script[offset] == 'W' && strcmp(dp->symbol,"KMD") != 0 ) { // if valid add to pricefeed for issue - printf("WITHDRAW ht.%d txi.%d vout.%d %.8f opretlen.%d\n",height,txi,vout,dstr(fiatoshis),opretlen); + printf("notary vout.%s ht.%d txi.%d vout.%d %.8f opretlen.%d\n",symbol,height,txi,vout,dstr(fiatoshis),opretlen); if ( opretlen == 38 ) // any KMD tx { offset++; diff --git a/iguana/exchanges/LP_include.h b/iguana/exchanges/LP_include.h index 632c344bd..dfb696e97 100644 --- a/iguana/exchanges/LP_include.h +++ b/iguana/exchanges/LP_include.h @@ -306,7 +306,7 @@ struct iguana_info int32_t numutxos,notarized,longestchain,firstrefht,firstscanht,lastscanht,height; uint16_t busport,did_addrutxo_reset; uint32_t txversion,dPoWtime,lastautosplit,lastresetutxo,loadedcache,electrumlist,lastunspent,importedprivkey,lastpushtime,lastutxosync,addr_listunspent_requested,lastutxos,updaterate,counter,inactive,lastmempool,lastgetinfo,ratetime,heighttime,lastmonitor,obooktime; uint8_t pubtype,p2shtype,isPoS,wiftype,wiftaddr,taddr,noimportprivkey_flag,userconfirms,isassetchain,maxconfirms; - char symbol[128],smartaddr[64],userpass[1024],serverport[128],instantdex_address[64],estimatefeestr[32],getinfostr[32],etomic[64]; + char symbol[128],smartaddr[64],userpass[1024],serverport[128],instantdex_address[64],estimatefeestr[32],getinfostr[32],etomic[64],validateaddress[64]; // portfolio double price_kmd,force,perc,goal,goalperc,relvolume,rate; void *electrum; void *ctx; diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 93a2b75e1..41b24d580 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -53,7 +53,7 @@ cJSON *bitcoin_json(struct iguana_info *coin,char *method,char *params) // printf("issue.(%s, %s, %s, %s, %s)\n",coin->symbol,coin->serverport,coin->userpass,method,params); if ( coin->electrum != 0 && (strcmp(method,"getblock") == 0 || strcmp(method,"paxprice") == 0 || strcmp(method,"getrawmempool") == 0) ) return(cJSON_Parse("{\"error\":\"illegal electrum call\"}")); - if ( coin->inactive == 0 || strcmp(method,"importprivkey") == 0 || strcmp(method,"validateaddress") == 0 || strcmp(method,"getrawtransaction") == 0 || strcmp(method,"getblock") == 0 || strcmp(method,"getinfo") == 0 || strcmp(method,"getblockchaininfo") == 0 ) + if ( coin->inactive == 0 || strcmp(method,"importprivkey") == 0 || strcmp(method,"validateaddress") == 0 || strcmp(method,"getaddressinfo") == 0 || strcmp(method,"getrawtransaction") == 0 || strcmp(method,"getblock") == 0 || strcmp(method,"getinfo") == 0 || strcmp(method,"getblockchaininfo") == 0 ) { if ( coin->electrum == 0 ) { @@ -344,7 +344,17 @@ cJSON *LP_validateaddress(char *symbol,char *address) else { sprintf(buf,"[\"%s\"]",address); - return(bitcoin_json(coin,"validateaddress",buf)); + if ( (retjson= bitcoin_json(coin,coin->validateaddress,buf)) != 0 ) + { + if ( jobj(retjson,"ismine") == 0 && strcmp(coin->validateaddress,"validateaddress") == 0 ) + { + printf("autochange validateaddress -> getaddressinfo\n",coin->symbol); + strcpy(coin->validateaddress,"getaddressinfo"); + free(retjson); + return(bitcoin_json(coin,coin->validateaddress,buf)); + } + } + return(retjson); } }