Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
9e4f2d104e
  1. 4
      gecko/gecko_blocks.c

4
gecko/gecko_blocks.c

@ -162,6 +162,7 @@ int32_t gecko_hwmset(struct supernet_info *myinfo,struct iguana_info *virt,struc
char *gecko_blockarrived(struct supernet_info *myinfo,struct iguana_info *virt,char *remoteaddr,uint8_t *data,int32_t datalen,bits256 hash2,int32_t verifyonly)
{
struct iguana_txblock txdata; int32_t height,valid,adjacent,gap,n,i,j,len = -1; struct iguana_block *block,*prev; struct iguana_txid tx; char str[65]; bits256 txid; struct iguana_msgtx *txs;
printf("gecko_blockarrived\n");
memset(&txdata,0,sizeof(txdata));
iguana_memreset(&virt->TXMEM);
if ( (n= iguana_gentxarray(virt,&virt->TXMEM,&txdata,&len,data,datalen)) == datalen )
@ -296,6 +297,7 @@ int32_t basilisk_blocksubmit(struct supernet_info *myinfo,struct iguana_info *bt
int32_t i,datalen,num,numerrs,numresults=0; uint8_t *data,space[16384],*allocptr; cJSON *valsobj=0,*retjson,*retarray,*item; char *str,*str2,*othercoin; bits256 othertip;
if ( (data= get_dataptr(sizeof(struct iguana_msghdr) + BASILISK_HDROFFSET,&allocptr,&datalen,space,sizeof(space),blockstr)) != 0 )
{
printf("call gecko_blockarrived\n");
if ( (str= gecko_blockarrived(myinfo,virt,"127.0.0.1",data,datalen,hash2,0)) != 0 )
{
if ( (retjson= cJSON_Parse(str)) != 0 )
@ -350,7 +352,7 @@ int32_t basilisk_blocksubmit(struct supernet_info *myinfo,struct iguana_info *bt
free(str);
}*/
}
}
} else printf("basilisk_blocksumbit dataptr error\n");
if ( allocptr != 0 )
free(allocptr);
return(numresults);

Loading…
Cancel
Save