Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
327c98bd29
  1. 2
      basilisk/basilisk.c
  2. 11
      gecko/gecko.c

2
basilisk/basilisk.c

@ -186,7 +186,7 @@ int32_t basilisk_sendcmd(struct supernet_info *myinfo,char *destipaddr,char *typ
if ( strcmp(type,"BLK") == 0 ) if ( strcmp(type,"BLK") == 0 )
{ {
for (s=0; s<myinfo->numrelays; s++) for (s=0; s<myinfo->numrelays; s++)
if ( myinfo->relays[s].ipbits == addr->ipbits ) if ( addr->ipbits != myinfo->myaddr.myipbits && myinfo->relays[s].ipbits == addr->ipbits )
break; break;
if ( s == myinfo->numrelays ) if ( s == myinfo->numrelays )
{ {

11
gecko/gecko.c

@ -14,8 +14,6 @@
* * * *
******************************************************************************/ ******************************************************************************/
// are nbits and magicstr endian dependent?
// code mempool and tx (payment and opreturn protocol) // code mempool and tx (payment and opreturn protocol)
// debug genesis balances // debug genesis balances
@ -44,9 +42,16 @@
void gecko_iteration(struct supernet_info *myinfo,struct iguana_info *btcd,struct iguana_info *virt,int32_t maxmillis) void gecko_iteration(struct supernet_info *myinfo,struct iguana_info *btcd,struct iguana_info *virt,int32_t maxmillis)
{ {
char mineraddr[64]; int32_t hwmhdrsi,longesthdrsi; char mineraddr[64]; int32_t hwmhdrsi,longesthdrsi; struct iguana_bundle *bp;
hwmhdrsi = virt->blocks.hwmchain.height / virt->chain->bundlesize; hwmhdrsi = virt->blocks.hwmchain.height / virt->chain->bundlesize;
longesthdrsi = virt->longestchain / virt->chain->bundlesize; longesthdrsi = virt->longestchain / virt->chain->bundlesize;
if ( (bp= virt->bundles[hwmhdrsi]) != 0 )
{
iguana_RTspendvectors(virt,bp);
iguana_RTramchainalloc("RTbundle",virt,bp);
iguana_update_balances(virt);
iguana_realtime_update(myinfo,virt);
}
if ( 0 && hwmhdrsi <= longesthdrsi )//&& virt->blocks.hwmchain.height < virt->longestchain-1 ) if ( 0 && hwmhdrsi <= longesthdrsi )//&& virt->blocks.hwmchain.height < virt->longestchain-1 )
{ {
if ( time(NULL) > virt->hdrstime+3 ) if ( time(NULL) > virt->hdrstime+3 )

Loading…
Cancel
Save