Skip to content

Commit

Permalink
Merge pull request #110 from BlockMechanic/segwit
Browse files Browse the repository at this point in the history
Segwit
  • Loading branch information
BlockMechanic authored Sep 18, 2022
2 parents c9e2cbb + f9238fb commit 72432a6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")) {
Expand Down
11 changes: 10 additions & 1 deletion src/qt/transactionrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,17 @@ QList<TransactionRecord> 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);

}
}

Expand Down

0 comments on commit 72432a6

Please sign in to comment.