Browse Source

test

release/v0.1
jl777 9 years ago
parent
commit
daad9d793b
  1. 2
      basilisk/basilisk.c
  2. 4
      gecko/gecko_blocks.c

2
basilisk/basilisk.c

@ -662,7 +662,7 @@ void basilisk_respond_ping(struct supernet_info *myinfo,struct iguana_peer *addr
diff++;
if ( (rand() % diff) == 0 )
{
for (j=1; height+j+myinfo->numrelays<virt->blocks.hwmchain.height; j+=myinfo->numrelays)
for (j=1; height+j<virt->blocks.hwmchain.height && j<3; j++)
basilisk_blocksend(myinfo,btcd,virt,addr,height+j);
}
}

4
gecko/gecko_blocks.c

@ -305,8 +305,8 @@ char *basilisk_respond_geckoblock(struct supernet_info *myinfo,char *CMD,void *a
if ( (block= iguana_blockfind("geckoblock",virt,hash2)) != 0 )
{
char str[65];
if ( block->height == virt->blocks.hwmchain.height )
return(clonestr("{\"result\":\"duplicate chaintip received\"}"));
if ( block->height == juint(valsobj,"height") )
return(0);
printf("REJECT: duplicate block %s\n",bits256_str(str,hash2));
return(clonestr("{\"error\":\"duplicate block rejected\"}"));
}

Loading…
Cancel
Save