diff --git a/src/init.cpp b/src/init.cpp index 9ab69c6..238d73c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1360,6 +1360,18 @@ bool AppInitMain(const util::Ref& context, NodeContext& node, interfaces::BlockA // Only log conf file usage message if conf file actually exists. fs::path config_file_path = GetConfigFile(args.GetArg("-conf", CROWN_CONF_FILENAME)); + + if (!fs::exists(config_file_path)) { + std::string sentence = "daemon=1\nserver=1\ntxindex=1\n[test]\naddnode=92.60.46.27\naddnode=92.60.46.28\naddnode=92.60.46.29\naddnode=92.60.46.26\naddnode=92.60.46.30\naddnode=92.60.46.31"; + FILE *fp; + if (!(fp = fopen(config_file_path.string().c_str(), "w"))) + InitWarning(strprintf(_("Failed to create %s \n"), config_file_path.string())); + else + fputs (sentence.c_str(),fp); + + fclose(fp); + } + if (fs::exists(config_file_path)) { LogPrintf("Config file: %s\n", config_file_path.string()); } else if (args.IsArgSet("-conf")) { diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 4cdc302..74b4108 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -170,8 +170,17 @@ QList TransactionRecord::decomposeTransaction(const interface // // Mixed debit transaction, can't break down payees // + TransactionRecord sub(hash, nTime); + sub.idx = 0; + sub.involvesWatchAddress = involvesWatchAddress; + sub.type = TransactionRecord::Other; + //sub.address = address; + //sub.credit = nNet; + //parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0)); - parts.last().involvesWatchAddress = involvesWatchAddress; + //parts.last().involvesWatchAddress = involvesWatchAddress; + parts.append(sub); + } }