mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
CA: Use CAssetsDir that inits from config instead of wallet
- Don't maintain asset petnames in wallet. - RPC: Remove addassetlabel - Remove load functions in CWallet for asset labels. - "bitcoin" already hardcoded in CAssetsDir::InitFromStrings, remove from CWallet::InitLoadWallet - Remove CWallet::SetAssetPair
This commit is contained in:
parent
44ceb66a15
commit
246919c32d
7 changed files with 16 additions and 117 deletions
|
|
@ -17,6 +17,7 @@
|
|||
#include "checkpoints.h"
|
||||
#include "compat/sanity.h"
|
||||
#include "consensus/validation.h"
|
||||
#include "global/common.h"
|
||||
#include "httpserver.h"
|
||||
#include "httprpc.h"
|
||||
#include "key.h"
|
||||
|
|
@ -436,6 +437,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT));
|
||||
strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT));
|
||||
strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified BIP9 deployment (regtest-only)");
|
||||
strUsage += HelpMessageOpt("-assetdir=hexidstr:label", "For naming known assets");
|
||||
}
|
||||
std::string debugCategories = "addrman, alert, bench, cmpctblock, coindb, db, http, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below
|
||||
if (mode == HMM_BITCOIN_QT)
|
||||
|
|
@ -1077,6 +1079,12 @@ bool AppInitParameterInteraction()
|
|||
fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end());
|
||||
}
|
||||
|
||||
try {
|
||||
InitGlobalAssetDir(mapMultiArgs.count("-assetdir") > 0 ? mapMultiArgs.at("-assetdir") : std::vector<std::string>());
|
||||
} catch (const std::exception& e) {
|
||||
return InitError(strprintf("Error in -assetdir: %s\n", e.what()));
|
||||
}
|
||||
|
||||
if (mapMultiArgs.count("-bip9params")) {
|
||||
// Allow overriding BIP9 parameters for testing
|
||||
if (!chainparams.MineBlocksOnDemand()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue