Browse Source

Merge pull request #700 from jl777/jl777

Fix 100th block free
patch-3
jl777 7 years ago
committed by GitHub
parent
commit
8da1586324
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      iguana/dpow/dpow_fsm.c
  2. 2
      iguana/exchanges/coins
  3. 2
      iguana/iguana_notary.c

4
iguana/dpow/dpow_fsm.c

@ -604,7 +604,7 @@ void dpow_statemachinestart(void *ptr)
{
if ( (checkpoint.blockhash.height % 100) != 0 && dp->checkpoint.blockhash.height > checkpoint.blockhash.height )
{
printf("abort %s ht.%d due to new checkpoint.%d\n",dp->symbol,checkpoint.blockhash.height,dp->checkpoint.blockhash.height);
//printf("abort %s ht.%d due to new checkpoint.%d\n",dp->symbol,checkpoint.blockhash.height,dp->checkpoint.blockhash.height);
dp->ratifying -= bp->isratify;
free(ptr);
return;
@ -638,7 +638,7 @@ void dpow_statemachinestart(void *ptr)
bp->notaries[bp->myind].paxwdcrc = bp->paxwdcrc;
}
sleep(13);
if ( dp->checkpoint.blockhash.height > checkpoint.blockhash.height )
if ( (checkpoint.blockhash.height % 100) != 0 && dp->checkpoint.blockhash.height > checkpoint.blockhash.height )
{
if ( bp->isratify == 0 )
{

2
iguana/exchanges/coins

File diff suppressed because one or more lines are too long

2
iguana/iguana_notary.c

@ -139,7 +139,7 @@ void dpow_srcupdate(struct supernet_info *myinfo,struct dpow_info *dp,int32_t he
{
for (i=ht-100; i>=0; i--)
{
if ( (bp= dp->blocks[i]) != 0 && bp->state == 0xffffffff )
if ( (i % 100) != 0 && (bp= dp->blocks[i]) != 0 && bp->state == 0xffffffff )
{
dp->blocks[i] = 0;
Numallocated--;

Loading…
Cancel
Save