Browse Source

Test

etomic
jl777 7 years ago
parent
commit
fb26682b21
  1. 3
      iguana/exchanges/LP_include.h
  2. 13
      iguana/exchanges/LP_zeroconf.c

3
iguana/exchanges/LP_include.h

@ -322,7 +322,7 @@ struct LP_address
UT_hash_handle hh;
struct LP_address_utxo *utxos;
bits256 pubkey;
int64_t balance,total;
int64_t balance,total,zeroconf_credits;
uint32_t timestamp,n,unspenttime;
int32_t unspentheight;
char coinaddr[40];
@ -398,7 +398,6 @@ struct LP_pubkey_info
bits256 pubkey;
struct LP_pubkey_quote *quotes;
struct LP_pubswap *bobswaps,*aliceswaps;
uint64_t bondvalue,swaps_kmdvalue;
uint32_t timestamp,numerrors,lasttime;
int32_t istrusted;
uint8_t rmd160[20],sig[65],pubsecp[33],siglen;

13
iguana/exchanges/LP_zeroconf.c

@ -192,9 +192,16 @@ char *LP_zeroconf_claim(struct iguana_info *coin,char *depositaddr,uint32_t expi
void LP_zeroconf_credit(char *coinaddr,uint64_t satoshis,int32_t weeki,char *p2shaddr)
{
uint32_t timestamp;
timestamp = LP_FIRSTWEEKTIME + weeki*LP_WEEKMULT;
printf("ZEROCONF credit.(%s) %.8f weeki.%d (%s)\n",coinaddr,dstr(satoshis),weeki,p2shaddr);
uint32_t timestamp; struct LP_address *ap; struct iguana_info *coin = LP_coinfind("KMD");
if ( coin != 0 )
{
timestamp = LP_FIRSTWEEKTIME + weeki*LP_WEEKMULT;
if ( (ap= LP_address(coin,coinaddr)) != 0 )
{
ap->zeroconf_credits += satoshis;
printf("ZEROCONF credit.(%s) %.8f weeki.%d (%s) -> sum %.8f\n",coinaddr,dstr(satoshis),weeki,p2shaddr,dstr(ap->zeroconf_credits));
}
}
}
void LP_zeroconf_deposits(struct iguana_info *coin)

Loading…
Cancel
Save