|
|
@ -547,7 +547,7 @@ int32_t LP_connectstartbob(void *ctx,int32_t pubsock,char *base,char *rel,double |
|
|
|
if ( IPC_ENDPOINT >= 0 ) |
|
|
|
LP_queuecommand(0,jprint(reqjson,0),IPC_ENDPOINT,-1,0); |
|
|
|
} |
|
|
|
if ( qp->mpnet != 0 && qp->fill != 0 && qp->gtc != 0 ) |
|
|
|
if ( qp->mpnet != 0 && qp->gtc == 0 ) |
|
|
|
{ |
|
|
|
char *msg = jprint(reqjson,0); |
|
|
|
LP_mpnet_send(0,msg,1,0); |
|
|
@ -655,11 +655,11 @@ char *LP_trade(void *ctx,char *myipaddr,int32_t mypubsock,struct LP_quoteinfo *q |
|
|
|
LP_query(ctx,myipaddr,mypubsock,"request",qp); |
|
|
|
LP_Alicequery = *qp, LP_Alicemaxprice = qp->maxprice, Alice_expiration = qp->timestamp + timeout, LP_Alicedestpubkey = qp->srchash; |
|
|
|
} |
|
|
|
if ( qp->gtc != 0 ) |
|
|
|
if ( qp->gtc == 0 ) |
|
|
|
{ |
|
|
|
cJSON *reqjson = LP_quotejson(qp); |
|
|
|
char *msg = jprint(reqjson,1); |
|
|
|
LP_mpnet_send(1,msg,qp->fill,0); |
|
|
|
LP_mpnet_send(1,msg,1,0); |
|
|
|
free(msg); |
|
|
|
} |
|
|
|
char str[65]; printf("LP_trade mpnet.%d fill.%d gtc.%d %s/%s %.8f vol %.8f dest.(%s) maxprice %.8f etomicdest.(%s) uuid.%s fill.%d gtc.%d\n",qp->mpnet,qp->fill,qp->gtc,qp->srccoin,qp->destcoin,dstr(qp->satoshis),dstr(qp->destsatoshis),bits256_str(str,LP_Alicedestpubkey),qp->maxprice,qp->etomicdest,qp->uuidstr,qp->fill,qp->gtc); |
|
|
@ -1205,7 +1205,7 @@ printf("bob %s received REQUEST.(%s) mpnet.%d fill.%d gtc.%d\n",bits256_str(str, |
|
|
|
memset(zero.bytes,0,sizeof(zero)); |
|
|
|
LP_reserved_msg(1,qp->srccoin,qp->destcoin,zero,jprint(reqjson,0)); |
|
|
|
} |
|
|
|
if ( qp->mpnet != 0 && qp->gtc != 0 && qp->fill != 0 ) |
|
|
|
if ( qp->mpnet != 0 && qp->gtc == 0 ) |
|
|
|
{ |
|
|
|
char *msg = jprint(reqjson,0); |
|
|
|
LP_mpnet_send(0,msg,1,0); |
|
|
|