Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
7bef8b3116
  1. 5
      crypto777/OS_portable.h
  2. 2
      iguana/SuperNET.h
  3. 2
      iguana/iguana777.h
  4. 2
      iguana/iguana_unspents.c
  5. 25
      iguana/main.c
  6. 2
      iguana/peggy.h

5
crypto777/OS_portable.h

@ -62,6 +62,11 @@
#define MAP_FILE 0
#endif
#define fopen myfopen
#define fclose myfclose
FILE *myfopen(char *fname,char *mode);
int32_t myfclose(FILE *fp);
struct huffstream { uint8_t *ptr,*buf; uint32_t bitoffset,maski,endpos; uint32_t allocsize:31,allocated:1; };
typedef struct huffstream HUFF;

2
iguana/SuperNET.h

@ -201,6 +201,8 @@ struct supernet_info *SuperNET_MYINFOfind(int32_t *nump,bits256 pubkey);
void SuperNET_MYINFOadd(struct supernet_info *myinfo);
struct supernet_info *SuperNET_accountfind(cJSON *argjson);
int32_t SuperNET_MYINFOS(struct supernet_info **myinfos,int32_t max);
FILE *myfopen(char *fname,char *mode);
int32_t myfclose(FILE *fp);
#endif

2
iguana/iguana777.h

@ -849,6 +849,8 @@ void iguana_convertQ(struct iguana_info *coin,struct iguana_bundle *bp);
void iguana_convert(struct iguana_info *coin,struct iguana_bundle *bp);//,struct iguana_ramchain *ramchain);
int32_t iguana_bundleissuemissing(struct iguana_info *coin,struct iguana_bundle *bp,uint8_t *missings,int32_t priority,double mult);
int32_t iguana_blocksmissing(struct iguana_info *coin,int32_t *nonzp,uint8_t missings[IGUANA_MAXBUNDLESIZE/8+1],bits256 hashes[],double mult,struct iguana_bundle *bp,int32_t capacity);
FILE *myfopen(char *fname,char *mode);
int32_t myfclose(FILE *fp);
extern int32_t HDRnet,netBLOCKS;

2
iguana/iguana_unspents.c

@ -1991,7 +1991,7 @@ int32_t iguana_realtime_update(struct iguana_info *coin)
if ( bits256_cmp(coin->RThash1,bp->hashes[1]) != 0 )
coin->RThash1 = bp->hashes[1];
bp->lastRT = (uint32_t)time(NULL);
if ( coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
if ( 0 && coin->peers.numranked > 0 && time(NULL) > coin->RThdrstime+10 )
{
iguana_RThdrs(coin,bp,coin->peers.numranked);
coin->RThdrstime = bp->lastRT;

25
iguana/main.c

@ -23,7 +23,30 @@
#include "../pnacl_main.h"
#include "iguana777.h"
#include "SuperNET.h"
#include <stdio.h>
#undef fopen
#undef fclose
int32_t Fopen_count,Fclose_count;
FILE *myfopen(char *fname,char *mode)
{
FILE *fp;
if ( (fp= fopen(fname,mode)) != 0 )
{
Fopen_count++;
if ( Fopen_count > 2*Fclose_count )
printf("Fopens.%d vs Fcloses.%d [%d]\n",Fopen_count,Fclose_count,Fopen_count-Fclose_count);
return(fp);
}
return(0);
}
int32_t myfclose(FILE *fp)
{
Fclose_count++;
return(fclose(fp));
}
// ALL globals must be here!
char *Iguana_validcommands[] =
{

2
iguana/peggy.h

@ -371,5 +371,7 @@ uint32_t peggy_currentblock(void *globals);
struct peggy_unit *peggy_match(struct accts777_info *accts,int32_t peg,uint64_t nxt64bits,bits256 lockhash,uint16_t lockdays);
int32_t peggy_addunit(struct accts777_info *accts,struct peggy_unit *U,bits256 lockhash);
FILE *myfopen(char *fname,char *mode);
int32_t myfclose(FILE *fp);
#endif

Loading…
Cancel
Save