jl777 8 years ago
parent
commit
6f27aff986
  1. 1
      iguana/iguana777.c
  2. 4
      iguana/iguana_unspents.c

1
iguana/iguana777.c

@ -836,6 +836,7 @@ void iguana_callcoinstart(struct supernet_info *myinfo,struct iguana_info *coin)
memset(zero.bytes,0,sizeof(zero));
if ( (bp= iguana_bundlecreate(coin,&bundlei,0,*(bits256 *)coin->chain->genesis_hashdata,zero,1)) != 0 )
bp->bundleheight = 0;
printf("CALL MARKINIT\n");
iguana_unspents_markinit(myinfo,coin);
}

4
iguana/iguana_unspents.c

@ -899,9 +899,9 @@ void iguana_unspents_mark(struct supernet_info *myinfo,struct iguana_info *coin,
void iguana_unspents_markinit(struct supernet_info *myinfo,struct iguana_info *coin)
{
static int32_t didinit;
char *filestr,fname[1024]; long filesize; bits256 filetxid; cJSON *array,*item; int32_t i,filevout,n,firstslot;
if ( didinit == 0 )
{
char *filestr,fname[1024]; long filesize; bits256 filetxid; cJSON *array,*item; int32_t i,filevout,n,firstslot;
sprintf(fname,"%s/%s/utxo.json",GLOBAL_DBDIR,coin->symbol), OS_compatible_path(fname);
if ( (filestr= OS_filestr(&filesize,fname)) != 0 )
{
@ -930,7 +930,7 @@ void iguana_unspents_markinit(struct supernet_info *myinfo,struct iguana_info *c
free_json(array);
} else printf("parse error.(%s)\n",filestr);
free(filestr);
}
} else printf("couldnt open.(%s)\n",fname);
didinit = 1;
}
}

Loading…
Cancel
Save