diff --git a/iguana/exchanges/LP_rpc.c b/iguana/exchanges/LP_rpc.c index 3add08caf..b8bb2f969 100644 --- a/iguana/exchanges/LP_rpc.c +++ b/iguana/exchanges/LP_rpc.c @@ -263,8 +263,8 @@ cJSON *LP_gettx(char *symbol,bits256 txid) serialized = malloc(len); decode_hex(serialized,len,hexstr+1); //printf("DATA.(%s)\n",hexstr+1); - extraspace = calloc(1,100000); - retjson = bitcoin_data2json(coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->height,&checktxid,&msgtx,extraspace,100000,serialized,len,0,0); + extraspace = calloc(1,1000000); + retjson = bitcoin_data2json(coin->taddr,coin->pubtype,coin->p2shtype,coin->isPoS,coin->height,&checktxid,&msgtx,extraspace,1000000,serialized,len,0,0); free(serialized); free(extraspace); //printf("TX.(%s) match.%d\n",jprint(retjson,0),bits256_cmp(txid,checktxid)); @@ -619,9 +619,10 @@ char *LP_signrawtx(char *symbol,bits256 *signedtxidp,int32_t *completedp,cJSON * signedtx = calloc(1,len+1); strcpy(signedtx,hexstr); *completedp = is_cJSON_True(jobj(json,"complete")); - data = malloc(len >> 1); - decode_hex(data,len>>1,hexstr); - *signedtxidp = bits256_doublesha256(0,data,len >> 1); + len >>= 1; + data = malloc(len); + decode_hex(data,len,hexstr); + *signedtxidp = bits256_doublesha256(0,data,len); } //else printf("%s signrawtransaction.(%s) params.(%s)\n",coin->symbol,retstr,paramstr); diff --git a/iguana/exchanges/LP_socket.c b/iguana/exchanges/LP_socket.c index ec819f99d..854d52ec3 100644 --- a/iguana/exchanges/LP_socket.c +++ b/iguana/exchanges/LP_socket.c @@ -469,7 +469,7 @@ cJSON *electrum_address_listunspent(char *symbol,struct electrum_info *ep,cJSON //printf("LISTUNSPENT.(%s)\n",jprint(retjson,0)); if ( electrum_process_array(coin,addr,retjson) != 0 ) LP_postutxos(coin->symbol); - strcpy(coin->lastunspent,addr); + safecopy(coin->lastunspent,addr,sizeof(coin->lastunspent)); coin->unspenttime = (uint32_t)time(NULL); } } else retjson = LP_address_utxos(coin,addr,1); diff --git a/iguana/exchanges/electrum.kmd2 b/iguana/exchanges/electrum.kmd2 new file mode 100755 index 000000000..46b11276b --- /dev/null +++ b/iguana/exchanges/electrum.kmd2 @@ -0,0 +1,2 @@ +source userpass +curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"electrum\",\"coin\":\"KMD\",\"ipaddr\":\"173.212.225.176\",\"port\":50011}"