diff --git a/iguana/iguana_unspents.c b/iguana/iguana_unspents.c index 5489626bd..651d59c4d 100755 --- a/iguana/iguana_unspents.c +++ b/iguana/iguana_unspents.c @@ -1383,7 +1383,8 @@ int32_t iguana_volatilesinit(struct iguana_info *coin) { //char str[65]; //printf("set hwmchain.%d <- %s %p\n",bp->bundleheight+bp->n-1,bits256_str(str,bp->hashes[bp->n-1]),block); - coin->blocks.hwmchain = *block; + if ( block->height > coin->blocks.hwmchain.height ) + coin->blocks.hwmchain = *block; } //printf("end volatilesinit\n"); return(coin->balanceswritten); diff --git a/iguana/main.c b/iguana/main.c index 1c33f1f3b..9932fcfc7 100755 --- a/iguana/main.c +++ b/iguana/main.c @@ -426,7 +426,7 @@ void mainloop(struct supernet_info *myinfo) { isRT *= coin->isRT; numpeers += coin->peers.numranked; - if ( time(NULL) > coin->startutc+10 && coin->spendvectorsaved != 1 && coin->blocks.hwmchain.height/coin->chain->bundlesize >= (coin->longestchain-coin->minconfirms)/coin->chain->bundlesize ) + if ( time(NULL) > coin->startutc+10 && coin->spendvectorsaved == 0 && coin->blocks.hwmchain.height/coin->chain->bundlesize >= (coin->longestchain-coin->minconfirms)/coin->chain->bundlesize ) { n = coin->bundlescount-1; if ( iguana_emitfinished(coin,1) >= n )