From 342d36c151a070f9dfbf49a904a9784d8d9ca1cc Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 17 Jul 2016 17:34:08 -0300 Subject: [PATCH] test --- iguana/iguana_bundles.c | 2 ++ iguana/iguana_realtime.c | 6 +++--- iguana/main.c | 2 +- tradebots/main.c | 26 ++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 4 deletions(-) create mode 100755 tradebots/main.c diff --git a/iguana/iguana_bundles.c b/iguana/iguana_bundles.c index e7a48c433..99aa6cb56 100755 --- a/iguana/iguana_bundles.c +++ b/iguana/iguana_bundles.c @@ -1020,6 +1020,8 @@ int32_t iguana_bundlefinalize(struct supernet_info *myinfo,struct iguana_info *c { fprintf(stderr,"emitQ done coin.%p bp.[%d] ht.%d error\n",coin,bp->hdrsi,bp->bundleheight); bp->emitfinish = 0; + coin->emitbusy--; + return(0); } coin->emitbusy--; } diff --git a/iguana/iguana_realtime.c b/iguana/iguana_realtime.c index 9650bcfb2..75527ef73 100755 --- a/iguana/iguana_realtime.c +++ b/iguana/iguana_realtime.c @@ -270,14 +270,14 @@ int32_t iguana_realtime_update(struct supernet_info *myinfo,struct iguana_info * } } } - //char str[65]; printf("check longest.%d RTheight.%d hwm.%d %s %p\n",coin->longestchain,coin->RTheight,coin->blocks.hwmchain.height,bits256_str(str,bp->hashes[0]),block); + char str[65]; printf("check longest.%d RTheight.%d hwm.%d %s %p\n",coin->longestchain,coin->RTheight,coin->blocks.hwmchain.height,bits256_str(str,bp->hashes[0]),block); if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 ) coin->RThash1 = bp->hashes[1]; - bp->lastRT = (uint32_t)time(NULL); + //bp->lastRT = (uint32_t)time(NULL); if ( coin->peers != 0 && coin->RTheight <= coin->longestchain-offset && coin->peers->numranked > 0 && time(NULL) > coin->RThdrstime+6 ) { iguana_RThdrs(coin,bp,coin->peers->numranked); - coin->RThdrstime = bp->lastRT; + coin->RThdrstime = (uint32_t)time(NULL); } bp->lastRT = (uint32_t)time(NULL); iguana_RTramchainalloc("RTbundle",coin,bp); diff --git a/iguana/main.c b/iguana/main.c index d482f3866..a1e9f378e 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -418,7 +418,7 @@ void mainloop(struct supernet_info *myinfo) if ( time(NULL) > coin->startutc+10 && coin->spendvectorsaved == 0 && coin->blocks.hwmchain.height/coin->chain->bundlesize >= (coin->longestchain-coin->minconfirms)/coin->chain->bundlesize ) { n = coin->bundlescount-1; - printf("%s n.%d emitfinished.%d\n",coin->symbol,n,iguana_emitfinished(coin,1)); + //printf("%s n.%d emitfinished.%d\n",coin->symbol,n,iguana_emitfinished(coin,1)); if ( iguana_emitfinished(coin,1) >= n ) { if ( coin->PREFETCHLAG >= 0 && coin->fastfind == 0 ) diff --git a/tradebots/main.c b/tradebots/main.c new file mode 100755 index 000000000..6af899404 --- /dev/null +++ b/tradebots/main.c @@ -0,0 +1,26 @@ +/****************************************************************************** + * Copyright © 2014-2016 The SuperNET Developers. * + * * + * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * + * the top-level directory of this distribution for the individual copyright * + * holder information and the developer policies on copyright and licensing. * + * * + * Unless otherwise agreed in a custom licensing agreement, no part of the * + * SuperNET software, including this file may be copied, modified, propagated * + * or distributed except according to the terms contained in the LICENSE file * + * * + * Removal or modification of this copyright notice is prohibited. * + * * + ******************************************************************************/ + +#include "../iguana/iguana777.h" + +void tradebots_LP(char *jsonstr); + +int main(int argc,char **argv) +{ + long filesize; + printf("Start Liquidity Provider\n"); + tradebots_LP(OS_filestr(&filesize,"LP.conf")); + return(0); +} \ No newline at end of file