jl777
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
7 additions and
8 deletions
-
iguana/exchanges/LP_include.h
-
iguana/exchanges/LP_nativeDEX.c
-
iguana/exchanges/LP_ordermatch.c
-
iguana/exchanges/LP_zeroconf.c
|
|
@ -23,7 +23,7 @@ |
|
|
|
|
|
|
|
#define LP_MAJOR_VERSION "0" |
|
|
|
#define LP_MINOR_VERSION "1" |
|
|
|
#define LP_BUILD_NUMBER "15477" |
|
|
|
#define LP_BUILD_NUMBER "15577" |
|
|
|
#define LP_BARTERDEX_VERSION 1 |
|
|
|
#define LP_MAGICBITS 1 |
|
|
|
|
|
|
@ -83,7 +83,7 @@ void emscripten_usleep(int32_t x); // returns immediate, no sense for sleeping |
|
|
|
#define LP_SWAPSTEP_TIMEOUT 30 |
|
|
|
#define LP_MIN_TXFEE 10000 |
|
|
|
#define LP_MINVOL 20 |
|
|
|
#define LP_MINCLIENTVOL 20 |
|
|
|
#define LP_MINCLIENTVOL 200 |
|
|
|
#define LP_MINSIZE_TXFEEMULT 10 |
|
|
|
#define LP_REQUIRED_TXFEE 0.8 |
|
|
|
|
|
|
|
|
|
@ -21,12 +21,11 @@ |
|
|
|
// alice waiting for bestprice
|
|
|
|
// USD paxprice based USDvalue in portfolio
|
|
|
|
// cancel bid/ask
|
|
|
|
// delay swap credit back until notarization
|
|
|
|
// electrum dynamic trust over 1000
|
|
|
|
// https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki for signing BCH/BTG
|
|
|
|
//
|
|
|
|
// delay swap credit back until notarization
|
|
|
|
// bugs, validations:
|
|
|
|
// remove LP_utxo_bestfit from portfolio
|
|
|
|
// portfolio value based on ask?
|
|
|
|
// verify encrypted destpubkey, broadcast:0 setprice
|
|
|
|
|
|
|
|
|
|
@ -416,7 +416,7 @@ struct LP_utxoinfo *LP_address_myutxopair(struct LP_utxoinfo *butxo,int32_t iamb |
|
|
|
{ |
|
|
|
if ( (m= LP_address_utxo_ptrs(coin,iambob,utxos,max,ap,coinaddr)) > 1 ) |
|
|
|
{ |
|
|
|
if ( 0 ) |
|
|
|
if ( 1 ) |
|
|
|
{ |
|
|
|
int32_t i; |
|
|
|
for (i=0; i<m; i++) |
|
|
@ -429,11 +429,11 @@ struct LP_utxoinfo *LP_address_myutxopair(struct LP_utxoinfo *butxo,int32_t iamb |
|
|
|
{ |
|
|
|
up = utxos[mini]; |
|
|
|
utxos[mini] = 0; |
|
|
|
//printf("found mini.%d %.8f for targetval %.8f -> targetval2 %.8f, ratio %.2f\n",mini,dstr(up->U.value),dstr(targetval),dstr(targetval2),(double)up->U.value/targetval);
|
|
|
|
printf("found mini.%d %.8f for targetval %.8f -> targetval2 %.8f, ratio %.2f\n",mini,dstr(up->U.value),dstr(targetval),dstr(targetval2),(double)up->U.value/targetval); |
|
|
|
if ( (double)up->U.value/targetval < ratio-1 ) |
|
|
|
|
|
|
|
{ |
|
|
|
if ( 0 ) |
|
|
|
if ( 1 ) |
|
|
|
{ |
|
|
|
int32_t i; |
|
|
|
for (i=0; i<m; i++) |
|
|
|
|
|
@ -198,7 +198,7 @@ void LP_zeroconf_credit(int32_t dispflag,char *coinaddr,int64_t satoshis,int32_t |
|
|
|
if ( coin != 0 ) |
|
|
|
{ |
|
|
|
timestamp = LP_FIRSTWEEKTIME + weeki*LP_WEEKMULT; |
|
|
|
if ( time(NULL) < timestamp-24*3600 && (ap= LP_address(coin,coinaddr)) != 0 ) |
|
|
|
if ( time(NULL) < timestamp-60*3600 && (ap= LP_address(coin,coinaddr)) != 0 ) |
|
|
|
{ |
|
|
|
ap->zeroconf_credits += satoshis; |
|
|
|
if ( dispflag != 0 ) |
|
|
|