jl777 7 years ago
parent
commit
d1a4b07f07
  1. 11
      iguana/exchanges/LP_rpc.c
  2. 2
      iguana/exchanges/LP_socket.c
  3. 2
      iguana/exchanges/electrum.kmd2

11
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);

2
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);

2
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}"
Loading…
Cancel
Save