Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
dedd4229a9
  1. 6
      iguana/SuperNET_category.c
  2. 2
      iguana/btc
  3. 4
      iguana/swaps/iguana_BTCswap.c
  4. 2
      iguana/tests/addnode

6
iguana/SuperNET_category.c

@ -207,7 +207,7 @@ char *bitcoin_hexmsg(struct supernet_info *myinfo,struct category_info *cat,void
char *method="",*agent="",*retstr = 0; int32_t i,j; cJSON *json,*valsobj; struct iguana_info *coin=0; struct iguana_peer *addr;
if ( (json= cJSON_Parse(ptr)) != 0 )
{
//printf("bitcoinprocess.(%s)\n",jprint(json,0));
printf("bitcoinprocess.(%s)\n",jprint(json,0));
agent = jstr(json,"agent");
method = jstr(json,"method");
valsobj = jobj(json,"vals");
@ -231,7 +231,7 @@ char *bitcoin_hexmsg(struct supernet_info *myinfo,struct category_info *cat,void
}
if ( retstr == 0 )
return(0);
//printf("RELAY will return.(%s)\n",retstr);
printf("RELAY will return.(%s)\n",retstr);
for (j=0; j<IGUANA_MAXCOINS; j++)
{
if ( (coin= Coins[j]) == 0 )
@ -242,7 +242,7 @@ char *bitcoin_hexmsg(struct supernet_info *myinfo,struct category_info *cat,void
{
if ( addr->supernet != 0 && strcmp(addr->ipaddr,remoteaddr) == 0 )
{
//printf("send back rawtx_result addr->supernet.%u to (%s)\n",addr->supernet,addr->ipaddr);
printf("send back rawtx_result addr->supernet.%u to (%s)\n",addr->supernet,addr->ipaddr);
iguana_send_supernet(addr,retstr,0);
free_json(json);
return(retstr);

2
iguana/btc

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":5,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":8,\"endpend\":1,\"services\":129,\"maxpeers\":256,\"RELAY\":0,\"VALIDATE\":0}"
curl --url "http://127.0.0.1:7778" --data "{\"prefetchlag\":5,\"poll\":50,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"newcoin\":\"BTC\",\"startpend\":8,\"endpend\":1,\"services\":128,\"maxpeers\":32,\"RELAY\":0,\"VALIDATE\":0}"

4
iguana/swaps/iguana_BTCswap.c

@ -197,10 +197,10 @@ struct bitcoin_statetx *instantdex_signtx(char *str,struct supernet_info *myinfo
jaddnum(valsobj,"rawtxtag",rawtxtag);
jaddnum(valsobj,"locktime",locktime);
argjson = cJSON_CreateObject();
jaddnum(argjson,"timeout",100);
jaddnum(argjson,"timeout",60000);
if ( (retstr= iguana_rawtx(myinfo,coin,argjson,0,coin->changeaddr,addresses,valsobj,scriptstr)) != 0 )
{
printf("feetx got.(%s)\n",retstr);
printf("%s got.(%s)\n",str,retstr);
flag = 0;
if ( (retjson= cJSON_Parse(retstr)) != 0 )
{

2
iguana/tests/addnode

@ -1 +1 @@
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"addnode\",\"activecoin\":\"BTCD\",\"ipaddr\":\"148.251.68.48\"}"
curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"iguana\",\"method\":\"addnode\",\"activecoin\":\"BTCD\",\"ipaddr\":\"78.47.196.146\"}"

Loading…
Cancel
Save