mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge fc06881f13 into merged_master (Bitcoin PR bitcoin/bitcoin#27491)
This commit is contained in:
commit
cbd7b123d9
93 changed files with 546 additions and 303 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include <rpc/request.h>
|
||||
#include <tinyformat.h>
|
||||
#include <univalue.h>
|
||||
#include <util/chaintype.h>
|
||||
#include <util/exception.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
|
|
@ -73,10 +74,10 @@ static void SetupCliArgs(ArgsManager& argsman)
|
|||
{
|
||||
SetupHelpOptions(argsman);
|
||||
|
||||
const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::DEFAULT);
|
||||
const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET);
|
||||
const auto signetBaseParams = CreateBaseChainParams(CBaseChainParams::SIGNET);
|
||||
const auto regtestBaseParams = CreateBaseChainParams(CBaseChainParams::REGTEST);
|
||||
const auto defaultBaseParams = CreateBaseChainParams(ChainType::LIQUID1); // ELEMENTS
|
||||
const auto testnetBaseParams = CreateBaseChainParams(ChainType::TESTNET);
|
||||
const auto signetBaseParams = CreateBaseChainParams(ChainType::SIGNET);
|
||||
const auto regtestBaseParams = CreateBaseChainParams(ChainType::REGTEST);
|
||||
|
||||
argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
argsman.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
|
||||
|
|
@ -174,7 +175,7 @@ static int AppInitRPC(int argc, char* argv[])
|
|||
}
|
||||
// Check for chain settings (BaseParams() calls are only valid after this clause)
|
||||
try {
|
||||
SelectBaseParams(gArgs.GetChainName());
|
||||
SelectBaseParams(gArgs.GetChainTypeMeta());
|
||||
} catch (const std::exception& e) {
|
||||
tfm::format(std::cerr, "Error: %s\n", e.what());
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -426,10 +427,16 @@ private:
|
|||
std::vector<Peer> m_peers;
|
||||
std::string ChainToString() const
|
||||
{
|
||||
if (gArgs.GetChainName() == CBaseChainParams::TESTNET) return " testnet";
|
||||
if (gArgs.GetChainName() == CBaseChainParams::SIGNET) return " signet";
|
||||
if (gArgs.GetChainName() == CBaseChainParams::REGTEST) return " regtest";
|
||||
return "";
|
||||
switch (gArgs.GetChainType()) {
|
||||
case ChainType::TESTNET:
|
||||
return " testnet";
|
||||
case ChainType::SIGNET:
|
||||
return " signet";
|
||||
case ChainType::REGTEST:
|
||||
return " regtest";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
std::string PingTimeToString(double seconds) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue