From cd54656393615a1874a2cf8d3da537d2806b70a8 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 11 May 2016 22:36:23 -0500 Subject: [PATCH] test --- iguana/iguana_instantdex.c | 2 +- iguana/iguana_volatiles.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/iguana/iguana_instantdex.c b/iguana/iguana_instantdex.c index cecf092c1..775d518c7 100755 --- a/iguana/iguana_instantdex.c +++ b/iguana/iguana_instantdex.c @@ -806,7 +806,7 @@ int32_t instantdex_inv2data(struct supernet_info *myinfo,struct iguana_info *coi { if ( now < ap->offer.expiration && ap->dead == 0 ) { - if ( n < sizeof(hashes)/sizeof(*hashes) && GETBIT(ap->peerhas,addr->addrind) == 0 ) + if ( n < sizeof(hashes)/sizeof(*hashes) )//&& GETBIT(ap->peerhas,addr->addrind) == 0 ) hashes[n++] = instantdex_encodehash(ap->offer.base,ap->offer.rel,ap->offer.price64*instantdex_bidaskdir(&ap->offer),ap->orderid); queue_enqueue("acceptableQ",&exchange->acceptableQ,&ap->DL,0); } else free(ap); diff --git a/iguana/iguana_volatiles.c b/iguana/iguana_volatiles.c index bed0494ef..8f7970f44 100755 --- a/iguana/iguana_volatiles.c +++ b/iguana/iguana_volatiles.c @@ -205,9 +205,10 @@ int32_t iguana_volatileupdate(struct iguana_info *coin,int32_t incremental,struc else { printf("from.%d vs current.%d\n",fromheight,coin->current->bundleheight); - iguana_bundleremove(coin,spent_hdrsi,0); iguana_bundleremove(coin,fromheight/coin->chain->bundlesize,0); } + if ( coin->current != 0 && spent_hdrsi != coin->current->hdrsi ) + iguana_bundleremove(coin,spent_hdrsi,0); exit(-1); } else printf("volatileupdate error null rdata [%d]\n",spentchain->height/coin->current->bundleheight); return(-1);