From 9258f97e4b6f47ee70794f98af3457d8a4d8cf7d Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 17 Mar 2017 10:51:17 +0200 Subject: [PATCH 1/5] Test --- iguana/dpow/dpow_network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index cadc11faa..91a0d96a9 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -2138,11 +2138,11 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) if ( (flags & 4) == 0 && (size= nn_recv(myinfo->repsock,&dexp,NN_MSG,0)) > 0 ) { num2++; - //printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); + printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); if ( (retstr= dex_response(&broadcastflag,myinfo,dexp)) != 0 ) { signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1); - //printf("send back[%ld]\n",strlen(retstr)+1); + printf("send back[%ld]\n",strlen(retstr)+1); free(retstr); if ( broadcastflag != 0 ) { From 42c4174d9e137231b808f73b29ebe5630eeb8a96 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 17 Mar 2017 15:48:37 +0200 Subject: [PATCH 2/5] Test --- crypto777/OS_portable.h | 2 +- iguana/dpow/dpow_network.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto777/OS_portable.h b/crypto777/OS_portable.h index 040436d1a..d687df9e0 100755 --- a/crypto777/OS_portable.h +++ b/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 diff --git a/iguana/dpow/dpow_network.c b/iguana/dpow/dpow_network.c index 91a0d96a9..cadc11faa 100755 --- a/iguana/dpow/dpow_network.c +++ b/iguana/dpow/dpow_network.c @@ -2138,11 +2138,11 @@ int32_t dpow_nanomsg_update(struct supernet_info *myinfo) if ( (flags & 4) == 0 && (size= nn_recv(myinfo->repsock,&dexp,NN_MSG,0)) > 0 ) { num2++; - printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); + //printf("REP got %d crc.%08x\n",size,calc_crc32(0,(void *)dexp,size)); if ( (retstr= dex_response(&broadcastflag,myinfo,dexp)) != 0 ) { signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->repsock,retstr,(int32_t)strlen(retstr)+1); - printf("send back[%ld]\n",strlen(retstr)+1); + //printf("send back[%ld]\n",strlen(retstr)+1); free(retstr); if ( broadcastflag != 0 ) { From 2c551f0deac6fb419dee9a1057a9eb505e603828 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 18 Mar 2017 13:52:52 +0200 Subject: [PATCH 3/5] Test --- iguana/kmd_lookup.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/iguana/kmd_lookup.h b/iguana/kmd_lookup.h index 0d6e2f2f9..a07b5db29 100755 --- a/iguana/kmd_lookup.h +++ b/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); From b3da8ebbf7be8392411cf3aeeefe03870b71c14e Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 18 Mar 2017 16:44:24 +0200 Subject: [PATCH 4/5] Test --- iguana/kmd_lookup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/kmd_lookup.h b/iguana/kmd_lookup.h index a07b5db29..f44779156 100755 --- a/iguana/kmd_lookup.h +++ b/iguana/kmd_lookup.h @@ -694,11 +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")); + //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); + //fprintf(stderr,"numvouts.%d ht.%d %s\n",numvouts,height,coin->symbol); if ( coin->kmd_txidfp != 0 ) { ptr->fpos = ftell(coin->kmd_txidfp); From 502492912b704745ebdaf819ead9fb2dd0b1c558 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 21 Mar 2017 21:58:12 +0200 Subject: [PATCH 5/5] Height 250000 update --- .gitignore | 6 ++++++ iguana/iguana_payments.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f3176906f..1d70ba0e5 100755 --- a/.gitignore +++ b/.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 diff --git a/iguana/iguana_payments.c b/iguana/iguana_payments.c index cdb27e36c..842dd261c 100755 --- a/iguana/iguana_payments.c +++ b/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; }