jl777 7 years ago
parent
commit
905ca8f620
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 2
      iguana/exchanges/LP_network.c
  3. 6
      iguana/exchanges/LP_ordermatch.c

2
iguana/exchanges/LP_nativeDEX.c

@ -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 || strncmp(jstr(argjson,"method"),"reserve",7) == 0) )
fprintf(stderr,"finished %s\n",jsonstr);
free_json(argjson);
}

2
iguana/exchanges/LP_network.c

@ -314,6 +314,8 @@ void LP_broadcast_message(int32_t pubsock,char *base,char *rel,bits256 destpub25
if ( strncmp(method,"connect",7) == 0 || strcmp(method,"reserved") == 0 )
printf("CRC32.%u (%s)\n",crc32,msgstr);
LP_broadcast_finish(pubsock,base,rel,msg,argjson,0);
if ( strncmp(method,"connect",7) == 0 || strcmp(method,"reserved") == 0 )
printf("finished %u\n",crc32);
} // else printf("no valid method in (%s)\n",msgstr);
free_json(argjson);
} else printf("couldnt parse (%s)\n",msgstr);

6
iguana/exchanges/LP_ordermatch.c

@ -768,9 +768,9 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson,
butxo->T.lasttime = (uint32_t)time(NULL);
printf("set swappending.%u accept qprice %.8f, min %.8f\n(%s)\n",butxo->T.swappending,qprice,price,msg);
{
//bits256 zero;
//memset(&zero,0,sizeof(zero));
LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,butxo->S.otherpubkey,msg);
bits256 zero;
memset(&zero,0,sizeof(zero));
LP_broadcast_message(pubsock,Q.srccoin,Q.destcoin,zero,msg);//butxo->S.otherpubkey,msg);
LP_butxo_swapfields_set(butxo);
printf("return after RESERVED\n");
return(0);

Loading…
Cancel
Save