|
|
@ -587,12 +587,6 @@ char *LP_connectedalice(cJSON *argjson) // alice |
|
|
|
LP_aliceid(Q.tradeid,Q.aliceid,"error2",0,0); |
|
|
|
return(clonestr("{\"error\":\"cant find autxo\"}")); |
|
|
|
} |
|
|
|
/*if ( autxo->S.swap != 0 )
|
|
|
|
{ |
|
|
|
printf("ignore duplicate swap\n"); |
|
|
|
LP_aliceid(Q.tradeid,Q.aliceid,"error3",0,0); |
|
|
|
return(clonestr("{\"error\":\"ignore duplicate swap\"}")); |
|
|
|
}*/ |
|
|
|
LP_aliceid(Q.tradeid,Q.aliceid,"connected",Q.R.requestid,Q.R.quoteid); |
|
|
|
butxo = &B; |
|
|
|
memset(butxo,0,sizeof(*butxo)); |
|
|
@ -772,7 +766,7 @@ int32_t LP_tradecommand(void *ctx,char *myipaddr,int32_t pubsock,cJSON *argjson, |
|
|
|
LP_quoteparse(&Q,argjson); |
|
|
|
LP_requestinit(&Q.R,Q.srchash,Q.desthash,Q.srccoin,Q.satoshis-Q.txfee,Q.destcoin,Q.destsatoshis-Q.desttxfee,Q.timestamp,Q.quotetime,DEXselector); |
|
|
|
LP_tradecommand_log(argjson); |
|
|
|
printf("(%u-%u): received %12s aliceid.%22llu %5s/%-5s %12.8f -> %12.8f price %12.8f\n",Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis); |
|
|
|
printf("(%-10u %10u) %12s aliceid.%22llu %5s/%-5s %12.8f -> %12.8f price %12.8f\n",Q.R.requestid,Q.R.quoteid,method,(long long)Q.aliceid,Q.srccoin,Q.destcoin,dstr(Q.satoshis),dstr(Q.destsatoshis),(double)Q.destsatoshis/Q.satoshis); |
|
|
|
retval = 1; |
|
|
|
autxo = &A; |
|
|
|
butxo = &B; |
|
|
|