Mac build fixes

This commit is contained in:
fekt
2022-10-27 16:49:02 -04:00
parent 29ec7b5fb6
commit e313676562
7 changed files with 29 additions and 21 deletions

View File

@@ -1137,9 +1137,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if(fs::exists(asmap_path)) {
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
} else {
// Shit is fucked up, die an honorable death
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
return false;
// Mac SD
asmap_path = fs::path("/Applications/SilentDragon.app/Contents/MacOS/") / DEFAULT_ASMAP_FILENAME;
printf("%s: looking for asmap file at %s\n", __func__, asmap_path.c_str() );
if(fs::exists(asmap_path)) {
printf("%s: found asmap file at %s\n", __func__, asmap_path.c_str() );
} else {
// Shit is fucked up, die an honorable death
InitError(strprintf(_("Could not find any asmap file! Please report this bug to Hush Developers")));
return false;
}
}
}
}

View File

@@ -453,8 +453,10 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp, const CPubKey& my
return strHex;
UniValue result(UniValue::VOBJ);
unsigned int serializeSize = GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
result.push_back(Pair("hex", strHex));
result.push_back(Pair("size", GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) ));
result.push_back(Pair("size", serializeSize));
TxToJSONExpanded(tx, hashBlock, result, nHeight, nConfirmations, nBlockTime);
return result;
}

View File

@@ -1997,10 +1997,13 @@ UniValue rpc_stratum_updatework(const UniValue& params, bool fHelp, const CPubKe
// throw JSONRPCError(RPC_INTERNAL_ERROR, "Something went wrong, plz try again!");
// }
uint64_t clientsSize = json_clients.size();
uint64_t subscriptionsSize = subscriptions.size();
obj.push_back(Pair("clients", json_clients));
obj.push_back(Pair("updated", json_clients.size()));
obj.push_back(Pair("updated", clientsSize));
obj.push_back(Pair("skipped", skipped));
obj.push_back(Pair("total", subscriptions.size()));
obj.push_back(Pair("total", subscriptionsSize));
return obj;
}
@@ -2126,9 +2129,9 @@ UniValue rpc_stratum_getclientscount (const UniValue& params, bool fHelp, const
+ HelpExampleCli("stratum_getclientscount", "")
+ HelpExampleRpc("stratum_getclientscount", "")
);
UniValue obj(UniValue::VOBJ);
obj.push_back(Pair("total", subscriptions.size()));
uint64_t subscriptionsSize = subscriptions.size();
obj.push_back(Pair("total", subscriptionsSize));
return obj;
};

View File

@@ -558,12 +558,12 @@ boost::filesystem::path GetDefaultDataDir()
tmppath = pathRet;
tmppath /= "Komodo";
//TryCreateDirectory(tmppath);
if(fs::is_directory( tmppath / symbol) {
if(fs::is_directory( tmppath / symbol)) {
// Found legacy dir, use that
return tmppath / symbol;
} else {
// For new clones, use Hush/HUSH3
tmppath = pathRet / "Hush" / HUSH3;
tmppath = pathRet / "Hush" / "HUSH3";
}
return tmppath;
}
@@ -1036,11 +1036,8 @@ std::string LicenseInfo()
{
return "\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-%i Duke Leto and The Hush Developers"), COPYRIGHT_YEAR)) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-2020 jl777 and SuperNET developers"))) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2016-2018 The Zcash developers"))) + "\n" +
"\n" +
FormatParagraph(strprintf(_("Copyright (C) 2009-2014 The Bitcoin Core developers"))) + "\n" +
"\n" +
FormatParagraph(_("This is experimental Free Software! Fuck Yeah!!!!!")) + "\n" +