Browse Source

Test

etomic
jl777 7 years ago
parent
commit
040cc18eab
  1. 2
      iguana/exchanges/LP_include.h
  2. 5
      iguana/exchanges/LP_utxos.c

2
iguana/exchanges/LP_include.h

@ -77,7 +77,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping
#define LP_MIN_TXFEE 10000
#define LP_MINVOL 20
#define LP_MINCLIENTVOL 1000
#define LP_MINSIZE_TXFEEMULT 10
#define LP_MINSIZE_TXFEEMULT 3
#define LP_REQUIRED_TXFEE 0.8
#define LP_DEXFEE(destsatoshis) ((destsatoshis) / INSTANTDEX_INSURANCEDIV)

5
iguana/exchanges/LP_utxos.c

@ -539,9 +539,8 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
satoshis = LP_txvalue(destaddr,coin->symbol,txid,vout);
if ( satoshis != 0 && satoshis != value )
printf("%s %s privkey_init value %.8f vs %.8f (%s) %.8f %.8f\n",coin->symbol,coin->smartaddr,dstr(satoshis),dstr(value),jprint(item,0),jdouble(item,"amount"),jdouble(item,"interest"));
if ( LP_inventory_prevent(iambob,coin->symbol,txid,vout) != 0 )//&& height > 0 )
if ( LP_inventory_prevent(iambob,coin->symbol,txid,vout) == 0 )//&& height > 0 )
{
printf("PREVENT %s\n",jprint(item,0));
values[i] = satoshis;
//flag += LP_address_utxoadd(coin,destaddr,txid,vout,satoshis,height,-1);
} else used++;
@ -574,7 +573,7 @@ int32_t LP_privkey_init(int32_t mypubsock,struct iguana_info *coin,bits256 mypri
else targetval = (depositval / 9) * 8 + 2*txfee;
if ( targetval < txfee*2 )
targetval = txfee*2;
//printf("iambob.%d i.%d deposit %.8f min %.8f target %.8f\n",iambob,i,dstr(depositval),dstr((1+LP_MINSIZE_TXFEEMULT)*txfee),dstr(targetval));
printf("iambob.%d i.%d deposit %.8f min %.8f target %.8f\n",iambob,i,dstr(depositval),dstr((1+LP_MINSIZE_TXFEEMULT)*txfee),dstr(targetval));
if ( depositval < (1+LP_MINSIZE_TXFEEMULT)*txfee )
continue;
i = -1;

Loading…
Cancel
Save