Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
afac33ec82
  1. 10
      gecko/gecko.c
  2. 4
      iguana/iguana_msg.c

10
gecko/gecko.c

@ -212,10 +212,12 @@ struct iguana_info *basilisk_geckochain(struct supernet_info *myinfo,char *symbo
if ( virt->blocks.hwmchain.height == 0 ) if ( virt->blocks.hwmchain.height == 0 )
{ {
memset(&txdata,0,sizeof(txdata)); memset(&txdata,0,sizeof(txdata));
iguana_gentxarray(virt,&virt->TXMEM,&txdata,&len,serialized,datalen); if ( iguana_gentxarray(virt,&virt->TXMEM,&txdata,&len,serialized,datalen) == datalen )
txdata.zblock.height = 0; {
txdata.zblock.RO.allocsize = iguana_ROallocsize(virt); txdata.zblock.height = 0;
gecko_hwmset(myinfo,virt,&txdata,virt->TXMEM.ptr,serialized,datalen,txdata.numtxids,0); txdata.zblock.RO.allocsize = iguana_ROallocsize(virt);
gecko_hwmset(myinfo,virt,&txdata,virt->TXMEM.ptr,serialized,datalen,txdata.numtxids,0);
}
} }
virt->started = virt; virt->started = virt;
virt->active = (uint32_t)time(NULL); virt->active = (uint32_t)time(NULL);

4
iguana/iguana_msg.c

@ -689,14 +689,14 @@ int32_t iguana_gentxarray(struct iguana_info *coin,struct OS_memspace *mem,struc
if ( len+32 > recvlen ) if ( len+32 > recvlen )
{ {
printf("gentxarrayB error len.%d > recvlen.%d\n",len,recvlen); printf("gentxarrayB error len.%d > recvlen.%d\n",len,recvlen);
break; return(-1);
} }
if ( (n= iguana_rwtx(coin->chain->zcash,0,mem,&data[len],&tx[i],recvlen - len,&tx[i].txid,coin->chain->isPoS,strcmp(coin->symbol,"VPN")==0)) < 0 ) if ( (n= iguana_rwtx(coin->chain->zcash,0,mem,&data[len],&tx[i],recvlen - len,&tx[i].txid,coin->chain->isPoS,strcmp(coin->symbol,"VPN")==0)) < 0 )
{ {
for (i=0; i<recvlen-hdrlen; i++) for (i=0; i<recvlen-hdrlen; i++)
printf("%02x",data[hdrlen+i]); printf("%02x",data[hdrlen+i]);
printf(" <- gentxarrayC error i.%d len.%d > recvlen.%d, n.%d hdrlen.%d\n",i,len,recvlen,n,hdrlen); printf(" <- gentxarrayC error i.%d len.%d > recvlen.%d, n.%d hdrlen.%d\n",i,len,recvlen,n,hdrlen);
break; return(-1);
} }
numvouts += tx[i].tx_out; numvouts += tx[i].tx_out;
numvins += tx[i].tx_in; numvins += tx[i].tx_in;

Loading…
Cancel
Save