Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e9b7dbb571
  1. 2
      iguana/exchanges/LP_peers.c
  2. 6
      iguana/exchanges/LP_portfolio.c

2
iguana/exchanges/LP_peers.c

@ -106,7 +106,7 @@ struct LP_peerinfo *LP_addpeer(struct LP_peerinfo *mypeer,int32_t mypubsock,char
nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_SNDTIMEO,&timeout,sizeof(timeout));
//maxsize = 2 * 1024 * 1024;
//nn_setsockopt(pushsock,NN_SOL_SOCKET,NN_SNDBUF,&maxsize,sizeof(maxsize));
printf("connected to push.(%s) pushsock.%d valid.%d\n",pushaddr,pushsock,valid);
printf("connected to push.(%s) pushsock.%d valid.%d | ",pushaddr,pushsock,valid);
peer->connected = (uint32_t)time(NULL);
peer->pushsock = pushsock;
if ( (subsock= nn_socket(AF_SP,NN_SUB)) >= 0 )

6
iguana/exchanges/LP_portfolio.c

@ -242,8 +242,8 @@ int32_t LP_autoprice(char *base,char *rel,cJSON *argjson)
{
if ( fixedprice > SMALLVAL )
{
refbase = base;
refrel = rel;
refbase = rel;
refrel = base;
}
for (i=0; i<num_LP_autorefs; i++)
{
@ -261,7 +261,7 @@ int32_t LP_autoprice(char *base,char *rel,cJSON *argjson)
safecopy(LP_autorefs[num_LP_autorefs].refrel,refrel,sizeof(LP_autorefs[num_LP_autorefs].refrel));
safecopy(LP_autorefs[num_LP_autorefs].base,base,sizeof(LP_autorefs[num_LP_autorefs].base));
safecopy(LP_autorefs[num_LP_autorefs].rel,rel,sizeof(LP_autorefs[num_LP_autorefs].rel));
printf("%d Using ref %s/%s for %s/%s factor %.8f, offset %.8f, margin %.8f\n",num_LP_autorefs,refbase,refrel,base,rel,factor,offset,margin);
printf("%d Using ref %s/%s for %s/%s factor %.8f, offset %.8f, margin %.8f fixed %.8f\n",num_LP_autorefs,refbase,refrel,base,rel,factor,offset,margin,fixedprice);
num_LP_autorefs++;
}
}

Loading…
Cancel
Save