diff --git a/iguana/iguana_ramchain.c b/iguana/iguana_ramchain.c index 3a6d22ffe..39910238c 100755 --- a/iguana/iguana_ramchain.c +++ b/iguana/iguana_ramchain.c @@ -1280,14 +1280,15 @@ int32_t iguana_bundleremove(struct iguana_info *coin,int32_t hdrsi,int32_t tmpfi struct iguana_bundle *bp; int32_t i; char fname[1024],str[65]; if ( hdrsi >= 0 && hdrsi < coin->bundlescount && (bp= coin->bundles[hdrsi]) != 0 ) { + iguana_volatilespurge(coin,&bp->ramchain); printf("%s delete bundle.[%d]\n",coin->symbol,hdrsi); + if ( iguana_bundlefname(coin,bp,fname) == 0 ) + OS_removefile(fname,0); if ( tmpfiles != 0 ) { for (i=0; in; i++) iguana_blockunmark(coin,bp->blocks[i],bp,i,1); } - if ( iguana_bundlefname(coin,bp,fname) == 0 ) - OS_removefile(fname,0); sprintf(fname,"%s/%s/spends/%s.%d",GLOBAL_DBDIR,coin->symbol,bits256_str(str,bp->hashes[0]),bp->bundleheight), OS_removefile(fname,0); sprintf(fname,"%s/%s/accounts/debits.%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight), OS_removefile(fname,0); sprintf(fname,"%s/%s/accounts/lastspends.%d",GLOBAL_DBDIR,coin->symbol,bp->bundleheight), OS_removefile(fname,0);