Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
342d36c151
  1. 2
      iguana/iguana_bundles.c
  2. 6
      iguana/iguana_realtime.c
  3. 2
      iguana/main.c
  4. 26
      tradebots/main.c

2
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--;
}

6
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);

2
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 )

26
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);
}
Loading…
Cancel
Save