jl777 7 years ago
parent
commit
718b7a1463
  1. 2
      iguana/exchanges/LP_nativeDEX.c
  2. 6
      iguana/exchanges/LP_remember.c
  3. 4
      iguana/exchanges/LP_transaction.c

2
iguana/exchanges/LP_nativeDEX.c

@ -521,6 +521,8 @@ void LP_coinsloop(void *_coins)
continue;
else if ( strcmp("BTC",coin->symbol) == 0 || strcmp("KMD",coin->symbol) == 0 )
continue;
if ( coins[0] != 0 )
printf("%s loop\n",coins);
memset(&zero,0,sizeof(zero));
if ( coin->inactive != 0 )
continue;

6
iguana/exchanges/LP_remember.c

@ -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]));

4
iguana/exchanges/LP_transaction.c

@ -1259,7 +1259,9 @@ bits256 LP_swap_spendtxid(char *symbol,char *destaddr,bits256 utxotxid,int32_t v
coinaddr[0] = 0;
memset(&spendtxid,0,sizeof(spendtxid));
if ( LP_spendsearch(destaddr,&spendtxid,&spendvin,symbol,utxotxid,vout) > 0 )
printf("spend of %s/v%d detected\n",bits256_str(str,utxotxid),vout);
{
//printf("spend of %s/v%d detected\n",bits256_str(str,utxotxid),vout);
}
else if ( 0 && (coin= LP_coinfind(symbol)) != 0 && coin->electrum == 0 )
{
if ( (retjson= LP_gettxout(symbol,coinaddr,utxotxid,vout)) == 0 )

Loading…
Cancel
Save