Browse Source

Test

etomic
jl777 7 years ago
parent
commit
13349dbaf6
  1. 4
      iguana/exchanges/LP_cache.c
  2. 4
      iguana/exchanges/LP_socket.c

4
iguana/exchanges/LP_cache.c

@ -70,8 +70,8 @@ void LP_SPV_store(struct iguana_info *coin,char *coinaddr,bits256 txid,int32_t h
struct LP_transaction *tx = 0;
if ( strcmp(coin->smartaddr,coinaddr) == 0 && (tx= LP_transactionfind(coin,txid)) != 0 && tx->serialized != 0 )
{
char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
} else printf("skip SPV store for (%s) tx.%p\n",coinaddr,tx);
//char str[65]; printf("store %s %s.[%d]\n",coin->symbol,bits256_str(str,txid),tx->len);
} //else printf("skip SPV store for (%s) tx.%p\n",coinaddr,tx);
}
bits256 iguana_merkle(bits256 *tree,int32_t txn_count)

4
iguana/exchanges/LP_socket.c

@ -423,7 +423,7 @@ cJSON *electrum_submit(char *symbol,struct electrum_info *ep,cJSON **retjsonp,ch
{
*retjsonp = 0;
sprintf(stratumreq,"{ \"jsonrpc\":\"2.0\", \"id\": %u, \"method\":\"%s\", \"params\": %s }\n",ep->stratumid,method,params);
printf("%s %s",symbol,stratumreq);
//printf("%s %s",symbol,stratumreq);
memset(ep->buf,0,ep->bufsize);
sitem = electrum_sitem(ep,stratumreq,timeout,retjsonp);
/*sitem = (struct stritem *)queueitem(stratumreq);
@ -864,7 +864,7 @@ int32_t LP_recvfunc(struct electrum_info *ep,char *str,int32_t len)
ep->lasttime = (uint32_t)time(NULL);
if ( (strjson= cJSON_Parse(str)) != 0 )
{
printf("%s RECV.(%ld) id.%d\n",ep->symbol,strlen(str),jint(strjson,"id"));
//printf("%s RECV.(%ld) id.%d\n",ep->symbol,strlen(str),jint(strjson,"id"));
resultjson = jobj(strjson,"result");
//printf("strjson.(%s)\n",jprint(strjson,0));
if ( (method= jstr(strjson,"method")) != 0 )

Loading…
Cancel
Save