From 1e9d78fcd63c557a33cc0ee81d345043763e501b Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 1 Nov 2016 13:28:23 -0300 Subject: [PATCH] test --- iguana/dpow/dpow_fsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/dpow/dpow_fsm.c b/iguana/dpow/dpow_fsm.c index f76aaee67..7e62d487a 100755 --- a/iguana/dpow/dpow_fsm.c +++ b/iguana/dpow/dpow_fsm.c @@ -443,7 +443,7 @@ void dpow_statemachinestart(void *ptr) dp->blocks[checkpoint.blockhash.height] = bp; bp->beacon = rand256(0); vcalc_sha256(0,bp->commit.bytes,bp->beacon.bytes,sizeof(bp->beacon)); - if ( dp->blocks[checkpoint.blockhash.height - 1000] != 0 ) + if ( checkpoint.blockhash.height > 0 && dp->blocks[checkpoint.blockhash.height - 1000] != 0 ) { printf("purge %s.%d\n",dp->dest,checkpoint.blockhash.height - 1000); free(dp->blocks[checkpoint.blockhash.height - 1000]);