|
|
@ -670,7 +670,7 @@ int32_t LP_refht_update(char *symbol,bits256 txid) |
|
|
|
|
|
|
|
int32_t LP_swap_load(struct LP_swap_remember *rswap) |
|
|
|
{ |
|
|
|
int32_t i,needflag,addflag; long fsize; char fname[1024],str[65],*fstr,*symbol,*rstr; cJSON *txobj,*sentobj,*fileobj; bits256 txid,checktxid; uint64_t value; |
|
|
|
int32_t i,needflag,addflag; long fsize; char fname[1024],*fstr,*symbol,*rstr; cJSON *txobj,*sentobj,*fileobj; bits256 txid,checktxid; uint64_t value; |
|
|
|
rswap->iambob = -1; |
|
|
|
sprintf(fname,"%s/SWAPS/%u-%u.finished",GLOBAL_DBDIR,rswap->requestid,rswap->quoteid), OS_compatible_path(fname); |
|
|
|
if ( (fstr= OS_filestr(&fsize,fname)) != 0 ) |
|
|
@ -767,7 +767,7 @@ int32_t LP_swap_load(struct LP_swap_remember *rswap) |
|
|
|
} |
|
|
|
free_json(sentobj); |
|
|
|
} |
|
|
|
printf("%s %s %.8f\n",txnames[i],bits256_str(str,txid),dstr(value)); |
|
|
|
//printf("%s %s %.8f\n",txnames[i],bits256_str(str,txid),dstr(value));
|
|
|
|
} |
|
|
|
} |
|
|
|
} //else printf("no symbol\n");
|
|
|
@ -1089,7 +1089,7 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti |
|
|
|
for (i=0; i<sizeof(txnames)/sizeof(*txnames); i++) |
|
|
|
if ( bits256_nonz(rswap.txids[i]) != 0 && rswap.values[i] == 0 ) |
|
|
|
rswap.values[i] = basilisk_txvalue(basilisk_isbobcoin(rswap.iambob,i) ? rswap.bobcoin : rswap.alicecoin,rswap.txids[i],0); |
|
|
|
if ( rswap.origfinishedflag == 0 ) |
|
|
|
if ( 0 && rswap.origfinishedflag == 0 ) |
|
|
|
{ |
|
|
|
printf("iambob.%d Apaymentspent.(%s) alice.%d bob.%d %s %.8f\n",rswap.iambob,bits256_str(str,rswap.Apaymentspent),rswap.sentflags[BASILISK_ALICERECLAIM],rswap.sentflags[BASILISK_BOBSPEND],rswap.alicecoin,dstr(rswap.values[BASILISK_ALICEPAYMENT])); |
|
|
|
printf("paymentspent.(%s) alice.%d bob.%d %s %.8f\n",bits256_str(str,rswap.paymentspent),rswap.sentflags[BASILISK_ALICESPEND],rswap.sentflags[BASILISK_BOBRECLAIM],rswap.bobcoin,dstr(rswap.values[BASILISK_BOBPAYMENT])); |
|
|
|