|
|
@ -346,7 +346,7 @@ int32_t basilisk_swap_isfinished(int32_t iambob,bits256 *txids,int32_t *sentflag |
|
|
|
n++; |
|
|
|
if ( n == 0 ) |
|
|
|
{ |
|
|
|
printf("if nothing sent, it is finished\n"); |
|
|
|
//printf("if nothing sent, it is finished\n");
|
|
|
|
return(1); |
|
|
|
} |
|
|
|
if ( iambob != 0 ) |
|
|
@ -851,13 +851,13 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti |
|
|
|
printf("Bob.%p is null or Alice.%p is null\n",bob,alice); |
|
|
|
return(cJSON_Parse("{\"error\":\"null bob or alice coin\"}")); |
|
|
|
} |
|
|
|
printf("ALICE.(%s) 1st refht %s <- %d, scan %d %d\n",rswap.Adestaddr,alice->symbol,alice->firstrefht,alice->firstscanht,alice->lastscanht); |
|
|
|
printf("BOB.(%s) 1st refht %s <- %d, scan %d %d\n",rswap.destaddr,bob->symbol,bob->firstrefht,bob->firstscanht,bob->lastscanht); |
|
|
|
//printf("iambob.%d finishedflag.%d %s %.8f txfee, %s %.8f txfee\n",rswap.iambob,rswap.finishedflag,rswap.alicecoin,dstr(rswap.Atxfee),rswap.bobcoin,dstr(rswap.Btxfee));
|
|
|
|
//printf("privAm.(%s) %p/%p\n",bits256_str(str,rswap.privAm),Adest,AAdest);
|
|
|
|
//printf("privBn.(%s) %p/%p\n",bits256_str(str,rswap.privBn),Bdest,ABdest);
|
|
|
|
if ( rswap.finishedflag == 0 && rswap.bobcoin[0] != 0 && rswap.alicecoin[0] != 0 ) |
|
|
|
{ |
|
|
|
//printf("ALICE.(%s) 1st refht %s <- %d, scan %d %d\n",rswap.Adestaddr,alice->symbol,alice->firstrefht,alice->firstscanht,alice->lastscanht);
|
|
|
|
//printf("BOB.(%s) 1st refht %s <- %d, scan %d %d\n",rswap.destaddr,bob->symbol,bob->firstrefht,bob->firstscanht,bob->lastscanht);
|
|
|
|
if ( alice->inactive != 0 || bob->inactive != 0 ) |
|
|
|
{ |
|
|
|
printf("Alice.%s inactive.%u or Bob.%s inactive.%u\n",rswap.alicecoin,alice->inactive,rswap.bobcoin,bob->inactive); |
|
|
@ -1101,7 +1101,7 @@ cJSON *basilisk_remember(int64_t *KMDtotals,int64_t *BTCtotals,uint32_t requesti |
|
|
|
if ( rswap.origfinishedflag == 0 && rswap.finishedflag != 0 ) |
|
|
|
{ |
|
|
|
char fname[1024],*itemstr; FILE *fp; |
|
|
|
//printf("SWAP %u-%u finished!\n",requestid,quoteid);
|
|
|
|
printf("SWAP %u-%u finished!\n",requestid,quoteid); |
|
|
|
sprintf(fname,"%s/SWAPS/%u-%u.finished",GLOBAL_DBDIR,rswap.requestid,rswap.quoteid), OS_compatible_path(fname); |
|
|
|
if ( (fp= fopen(fname,"wb")) != 0 ) |
|
|
|
{ |
|
|
|