Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
71b546e663
  1. 4
      iguana/iguana_init.c
  2. 4
      iguana/iguana_ramchain.c

4
iguana/iguana_init.c

@ -53,8 +53,8 @@ void iguana_initpeer(struct iguana_info *coin,struct iguana_peer *addr,uint64_t
void iguana_initcoin(struct iguana_info *coin,cJSON *argjson)
{
int32_t i; char dirname[512];
sprintf(dirname,"tmp/%s",coin->symbol), OS_portable_path(dirname);
OS_portable_rmdir(dirname,0);
//sprintf(dirname,"tmp/%s",coin->symbol), OS_portable_path(dirname);
//OS_portable_rmdir(dirname,0);
portable_mutex_init(&coin->peers_mutex);
portable_mutex_init(&coin->blocks_mutex);
portable_mutex_init(&coin->scripts_mutex[0]);

4
iguana/iguana_ramchain.c

@ -2147,9 +2147,9 @@ long iguana_ramchain_data(struct iguana_info *coin,struct iguana_peer *addr,stru
}
//if ( bits256_nonz(bp->hashes[bundlei]) == 0 )
// bp->hashes[bundlei] = origtxdata->block.RO.hash2;
if ( (block= bp->blocks[bundlei]) == 0 || bits256_cmp(block->RO.hash2,origtxdata->block.RO.hash2) != 0 )
if ( (block= bp->blocks[bundlei]) == 0 || bits256_cmp(block->RO.hash2,origtxdata->block.RO.hash2) != 0 || bits256_cmp(bp->hashes[bundlei],origtxdata->block.RO.hash2) != 0 )
{
char str[65]; printf("%d:%d has no block ptr %s\n",bp->hdrsi,bundlei,bits256_str(str,bp->hashes[bundlei]));
char str[65]; printf("%d:%d has no block ptr %s or wrong hash\n",bp->hdrsi,bundlei,bits256_str(str,origtxdata->block.RO.hash2));
return(-1);
}
if ( block->fpipbits != 0 )

Loading…
Cancel
Save