From 95c463966ae35231a49f708c0b8465360de4b4de Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Feb 2018 22:25:37 +0200 Subject: [PATCH] Dont create .conf from cli --- src/bitcoin-cli.cpp | 1 + src/komodo_utils.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp index cac650a00..253c49366 100644 --- a/src/bitcoin-cli.cpp +++ b/src/bitcoin-cli.cpp @@ -65,6 +65,7 @@ public: }; +#define FROM_CLI #include "uint256.h" #include "arith_uint256.h" diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 418a3225d..4b0521498 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1362,12 +1362,14 @@ void komodo_configfile(char *symbol,uint16_t port) #endif if ( (fp= fopen(fname,"rb")) == 0 ) { +#ifndef FROM_CLI if ( (fp= fopen(fname,"wb")) != 0 ) { fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port); fclose(fp); printf("Created (%s)\n",fname); } else printf("Couldnt create (%s)\n",fname); +#endif } else { @@ -1619,6 +1621,7 @@ void komodo_args(char *argv0) for (i=0; i<4; i++) sprintf(&magicstr[i<<1],"%02x",magic[i]); magicstr[8] = 0; +#ifndef FROM_CLI sprintf(fname,"gen%s",ASSETCHAINS_SYMBOL); if ( (fp= fopen(fname,"wb")) != 0 ) { @@ -1626,6 +1629,7 @@ void komodo_args(char *argv0) fclose(fp); //printf("created (%s)\n",fname); } else printf("error creating (%s)\n",fname); +#endif } else {