Browse Source

Merge pull request #309 from jl777/dev

Dev
beta
jl777 8 years ago
committed by GitHub
parent
commit
930727c449
  1. 6
      .gitignore
  2. 2
      crypto777/OS_portable.h
  3. 6
      iguana/iguana_payments.c
  4. 2
      iguana/kmd_lookup.h

6
.gitignore

@ -210,3 +210,9 @@ iguana/DB/SWAPS/270159951-1269722638
iguana/DB/SWAPS/244991424-1008712592
iguana/confs/1cc0270abba7f4463a3dcb9908b9d875691a6773fe3cc1b4302233ed76665300
iguana/autoAPI.md
iguana/confs/5228bcea7ae2515a29c3844673de6ee2acba53bf45724744a00ff4306f192912
iguana/confs/630929d976025fafde221c7358eb5805f4359bad3c6b8bd50ad3f6e0a9b5ce78

2
crypto777/OS_portable.h

@ -18,7 +18,7 @@
// iguana_OS has functions that invoke system calls. Whenever possible stdio and similar functions are use and most functions are fully portable and in this file. For things that require OS specific, the call is routed to iguana_OS_portable_* Usually, all but one OS can be handled with the same code, so iguana_OS_portable.c has most of this shared logic and an #ifdef iguana_OS_nonportable.c
#ifdef __APPLE__
#define LIQUIDITY_PROVIDER 1
//#define LIQUIDITY_PROVIDER 1
#endif
#ifdef NATIVE_WINDOWS

6
iguana/iguana_payments.c

@ -348,20 +348,22 @@ uint64_t _iguana_interest(uint32_t now,int32_t chainheight,uint32_t txlocktime,u
{
if ( minutes > 365 * 24 * 60 )
minutes = 365 * 24 * 60;
if ( chainheight >= 250000 )
minutes -= 59;
denominator = (((uint64_t)365 * 24 * 60) / minutes);
if ( denominator == 0 )
denominator = 1; // max KOMODO_INTEREST per transfer, do it at least annually!
if ( value > 25000LL*SATOSHIDEN && chainheight > 155949 )
{
numerator = (value / 20); // assumes 5%!
if ( chainheight < 300000 )
if ( chainheight < 250000 )
interest = (numerator / denominator);
else interest = (numerator * minutes) / ((uint64_t)365 * 24 * 60);
}
else if ( value >= 10*SATOSHIDEN )
{
numerator = (value * KOMODO_INTEREST);
if ( chainheight < 300000 || numerator * minutes < 365 * 24 * 60 )
if ( chainheight < 250000 || numerator * minutes < 365 * 24 * 60 )
interest = (numerator / denominator) / SATOSHIDEN;
else interest = ((numerator * minutes) / ((uint64_t)365 * 24 * 60)) / SATOSHIDEN;
}

2
iguana/kmd_lookup.h

@ -694,9 +694,11 @@ int32_t _kmd_bitcoinscan(struct iguana_info *coin)
{
bitcoin_addr2rmd160(&type_rmd160[0],&type_rmd160[1],jstri(addresses,0));
kmd_transactionvout(coin,ptr,j,jdouble(vout,"value")*SATOSHIDEN,type_rmd160,zero,-1);
//fprintf(stderr,"%.8f ",jdouble(vout,"value"));
} // else printf("missing sobj.%p or addresses.%p (%s)\n",sobj,addresses,jprint(vout,0)); //likely OP_RETURN
sobj = addresses = 0;
}
//fprintf(stderr,"numvouts.%d ht.%d %s\n",numvouts,height,coin->symbol);
if ( coin->kmd_txidfp != 0 )
{
ptr->fpos = ftell(coin->kmd_txidfp);

Loading…
Cancel
Save