|
|
@ -138,7 +138,7 @@ char *LP_forwardhex(int32_t pubsock,bits256 pubkey,char *hexstr) |
|
|
|
if ( reqjson != 0 ) |
|
|
|
{ |
|
|
|
retstr = LP_command_process(LP_mypeer != 0 ? LP_mypeer->ipaddr : "127.0.0.1",LP_mypubsock,reqjson,0,0,LP_profitratio - 1.); |
|
|
|
printf("LP_forwardhex.(%s) -> (%s)\n",jprint(reqjson,0),retstr!=0?retstr:""); |
|
|
|
//printf("LP_forwardhex.(%s) -> (%s)\n",jprint(reqjson,0),retstr!=0?retstr:"");
|
|
|
|
if ( pubsock >= 0 ) |
|
|
|
LP_send(pubsock,jprint(reqjson,0),0); |
|
|
|
} else printf("LP_forwardhex couldnt parse (%s)\n",(char *)data); |
|
|
@ -147,7 +147,7 @@ char *LP_forwardhex(int32_t pubsock,bits256 pubkey,char *hexstr) |
|
|
|
{ |
|
|
|
if ( ptr->pushsock >= 0 ) |
|
|
|
{ |
|
|
|
printf("%s forwardhex.(%s)\n",ptr->pushaddr,(char *)data); |
|
|
|
//printf("%s forwardhex.(%s)\n",ptr->pushaddr,(char *)data);
|
|
|
|
sentbytes = LP_send(ptr->pushsock,(char *)data,0); |
|
|
|
} |
|
|
|
retjson = cJSON_CreateObject(); |
|
|
@ -189,7 +189,7 @@ int32_t LP_forward(char *myipaddr,int32_t pubsock,double profitmargin,bits256 pu |
|
|
|
{ |
|
|
|
if ( bits256_cmp(pubkey,LP_mypubkey) == 0 ) |
|
|
|
{ |
|
|
|
printf("GOT FORWARDED.(%s)\n",jsonstr); |
|
|
|
//printf("GOT FORWARDED.(%s)\n",jsonstr);
|
|
|
|
if ( (argjson= cJSON_Parse(jsonstr)) != 0 ) |
|
|
|
{ |
|
|
|
if ( (retstr= LP_command_process(myipaddr,pubsock,argjson,0,0,profitmargin)) != 0 ) |
|
|
|