jl777 7 years ago
parent
commit
c2d6d15c97
  1. 6
      iguana/exchanges/LP_nativeDEX.c
  2. 1
      iguana/exchanges/LP_ordermatch.c

6
iguana/exchanges/LP_nativeDEX.c

@ -111,7 +111,7 @@ char *LP_command_process(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson
//if ( pubsock >= 0 ) //strncmp("{\"error\":",retstr,strlen("{\"error\":")) != 0 &&
//LP_send(pubsock,retstr,(int32_t)strlen(retstr)+1,0);
}
}
} else printf("finished tradecommand (%s)\n",jprint(argjson,0));
return(retstr);
}
@ -207,7 +207,7 @@ char *LP_process_message(void *ctx,char *typestr,char *myipaddr,int32_t pubsock,
if ( (retstr= LP_command_process(ctx,myipaddr,pubsock,argjson,&((uint8_t *)ptr)[len],recvlen - len)) != 0 )
{
}
if ( jobj(argjson,"method") != 0 && strncmp(jstr(argjson,"method"),"connect",7) == 0 )
//if ( jobj(argjson,"method") != 0 && strncmp(jstr(argjson,"method"),"connect",7) == 0 )
fprintf(stderr,"finished %s\n",jsonstr);
free_json(argjson);
}
@ -322,7 +322,7 @@ void command_rpcloop(void *myipaddr)
{
if ( peer->errors >= LP_MAXPEER_ERRORS )
{
if ( (rand() % 100) == 0 )
if ( (rand() % 1000) == 0 )
peer->errors--;
else
{

1
iguana/exchanges/LP_ordermatch.c

@ -772,6 +772,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
//memset(&zero,0,sizeof(zero));
LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,butxo->S.otherpubkey,msg);
LP_butxo_swapfields_set(butxo);
printf("return after RESERVED\n");
return(0);
}
} else printf("warning swappending.%u swap.%p\n",butxo->T.swappending,butxo->S.swap);

Loading…
Cancel
Save