From 9000f16bc8f5280206bae4a79a3a576405793165 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sun, 3 Apr 2016 18:21:10 -0500 Subject: [PATCH] test --- iguana/iguana777.c | 5 ++++- iguana/iguana777.h | 2 +- iguana/iguana_peers.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/iguana/iguana777.c b/iguana/iguana777.c index 1a7c0927c..12b267be4 100755 --- a/iguana/iguana777.c +++ b/iguana/iguana777.c @@ -612,7 +612,7 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, sprintf(dirname,"DB/%s/accounts",symbol), OS_ensure_directory(dirname); sprintf(dirname,"DB/%s/spends",symbol), OS_ensure_directory(dirname); sprintf(dirname,"DB/%s/vouts",symbol), OS_ensure_directory(dirname); - sprintf(dirname,"purgeable/%s",symbol), OS_ensure_directory(dirname); + sprintf(dirname,"%s/%s",coin->VALIDATEDIR,symbol), OS_ensure_directory(dirname); sprintf(dirname,"%s/%s",GLOBALTMPDIR,symbol), OS_ensure_directory(dirname); coin->initialheight = initialheight; coin->mapflags = mapflags; @@ -658,6 +658,9 @@ struct iguana_info *iguana_setcoin(char *symbol,void *launched,int32_t maxpeers, } else iguana_chainparms(coin->chain,json); coin->RELAYNODE = juint(json,"RELAY"); coin->VALIDATENODE = juint(json,"VALIDATE"); + if ( jobj(json,"validatedir") != 0 ) + safecopy(coin->VALIDATEDIR,jstr(json,"validatedir"),sizeof(coin->VALIDATEDIR)); + else strcpy(coin->VALIDATEDIR,"purgeable"); if ( (peers= jarray(&m,json,"peers")) != 0 ) { for (j=0; jVALIDATENODE != 0 || coin->RELAYNODE != 0 ) { - sprintf(fname,"purgeable/%s/%04d.vins",coin->symbol,addr->addrind); + sprintf(fname,"%s/%s/%04d.vins",coin->VALIDATEDIR,coin->symbol,addr->addrind); if ( (addr->vinsfp= fopen(fname,"rb+")) != 0 ) fseek(addr->vinsfp,0,SEEK_END); else if ( (addr->vinsfp= fopen(fname,"wb+")) == 0 )