Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
adba8cac7e
  1. 9
      gecko/gecko_blocks.c
  2. 2
      gecko/gecko_headers.c
  3. 5
      gecko/gecko_miner.c

9
gecko/gecko_blocks.c

@ -341,8 +341,13 @@ int32_t basilisk_blocksubmit(struct supernet_info *myinfo,struct iguana_info *bt
free_json(retjson);
}
free(str);
if ( (numresults >= myinfo->numrelays >> 1) && (str= gecko_blockarrived(myinfo,virt,"127.0.0.1",data,datalen,hash2,0)) != 0 )
free(str);
#ifndef __APPLE__
if ( numresults >= (myinfo->numrelays >> 1) )
#endif
{
if ( (str= gecko_blockarrived(myinfo,virt,"127.0.0.1",data,datalen,hash2,0)) != 0 )
free(str);
}
}
}
if ( allocptr != 0 )

2
gecko/gecko_headers.c

@ -96,7 +96,7 @@ void gecko_requesthdrs(struct supernet_info *myinfo,struct iguana_info *virt,int
memset(zero.bytes,0,sizeof(zero));
jaddstr(vals,"symbol",virt->symbol);
jaddstr(vals,"type","HDR");
if ( (retstr= basilisk_standardservice("GET",myinfo,bp->hashes[0],vals,0,1)) != 0 )
if ( (retstr= basilisk_standardservice("GET",myinfo,bp->hashes[0],vals,0,0)) != 0 )
free(retstr);
free_json(vals);
} else printf("dont have bundle needed\n");

5
gecko/gecko_miner.c

@ -330,7 +330,9 @@ int32_t gecko_blocksubmit(struct supernet_info *myinfo,struct iguana_info *btcd,
void gecko_miner(struct supernet_info *myinfo,struct iguana_info *btcd,struct iguana_info *virt,int32_t maxmillis,uint8_t *minerpubkey33)
{
struct iguana_zblock newblock; uint32_t prevtimestamp,nBits; int64_t reward = 0; int32_t i,gap,txn_count; char *blockstr,*space[256]; struct gecko_memtx **txptrs; void *ptr; //struct iguana_bundle *bp;
struct iguana_zblock newblock; uint32_t prevtimestamp,nBits; int64_t reward = 0; int32_t txn_count; char *blockstr,*space[256]; struct gecko_memtx **txptrs; void *ptr; //struct iguana_bundle *bp;
#ifndef __APPLE__
int32_t i,gap;
if ( virt->virtualchain == 0 || myinfo->RELAYID < 0 || myinfo->numrelays < 1 )
{
//printf("skip non-virtual chain.%s\n",virt->symbol);
@ -349,6 +351,7 @@ void gecko_miner(struct supernet_info *myinfo,struct iguana_info *btcd,struct ig
if ( i == gap )
return;
}
#endif
if ( virt->newblockstr != 0 )
{
gecko_blocksubmit(myinfo,btcd,virt,virt->newblockstr,virt->newblock.RO.hash2,virt->newblock.height);

Loading…
Cancel
Save