mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
ci: eliminate a bunch of build warnings
Includes removing some variables from qt/intro.cpp that've been unused since #13216 and ought to have been removed in the 0.17 rebase, but our linters were not so agressive then. Similarly fix the BITCOIN_PID_FILE, whose value was incorrectly changed in the 0.18 rebase.
This commit is contained in:
parent
a1bac6d8a6
commit
2f5c624b18
7 changed files with 24 additions and 21 deletions
|
|
@ -109,7 +109,11 @@ static const char* DEFAULT_ASMAP_FILENAME="ip_asn.map";
|
|||
/**
|
||||
* The PID file facilities.
|
||||
*/
|
||||
static const char* BITCOIN_PID_FILENAME = "bitcoind.pid";
|
||||
#ifdef LIQUID
|
||||
const char * const BITCOIN_PID_FILENAME = "liquid.pid";
|
||||
#else
|
||||
const char * const BITCOIN_PID_FILENAME = "elementsd.pid";
|
||||
#endif
|
||||
|
||||
static fs::path GetPidFile(const ArgsManager& args)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
/* Minimum free space (in GB) needed for data directory */
|
||||
constexpr uint64_t BLOCK_CHAIN_SIZE = 1;
|
||||
/* Minimum free space (in GB) needed for data directory when pruned; Does not include prune target */
|
||||
static const uint64_t CHAIN_STATE_SIZE = 0;
|
||||
|
||||
/* Check free space asynchronously to prevent hanging the UI thread.
|
||||
|
||||
Up to one request to check a path is in flight to this thread; when the check()
|
||||
|
|
|
|||
|
|
@ -226,11 +226,11 @@ void TestGUI(interfaces::Node& node)
|
|||
int initialRowCount = requestTableModel->rowCount({});
|
||||
QPushButton* requestPaymentButton = receiveCoinsDialog.findChild<QPushButton*>("receiveButton");
|
||||
requestPaymentButton->click();
|
||||
/* URI are disabled for Elements-QT
|
||||
for (QWidget* widget : QApplication::topLevelWidgets()) {
|
||||
if (widget->inherits("ReceiveRequestDialog")) {
|
||||
|
||||
ReceiveRequestDialog* receiveRequestDialog = qobject_cast<ReceiveRequestDialog*>(widget);
|
||||
/* URI are disabled for Elements-QT
|
||||
QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("payment_header")->text(), QString("Payment information"));
|
||||
QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("uri_tag")->text(), QString("URI:"));
|
||||
QString uri = receiveRequestDialog->QObject::findChild<QLabel*>("uri_content")->text();
|
||||
|
|
@ -248,9 +248,9 @@ void TestGUI(interfaces::Node& node)
|
|||
QCOMPARE(uri.count("message=TEST_MESSAGE_1"), 2);
|
||||
QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("message_tag")->text(), QString("Message:"));
|
||||
QCOMPARE(receiveRequestDialog->QObject::findChild<QLabel*>("message_content")->text(), QString("TEST_MESSAGE_1"));
|
||||
*/
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Clear button
|
||||
QPushButton* clearButton = receiveCoinsDialog.findChild<QPushButton*>("clearButton");
|
||||
|
|
|
|||
|
|
@ -629,7 +629,7 @@ public:
|
|||
void addUnchecked(const CTxMemPoolEntry& entry, setEntries& setAncestors, bool validFeeEstimate = true) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
|
||||
|
||||
void removeRecursive(const CTransaction &tx, MemPoolRemovalReason reason) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags) EXCLUSIVE_LOCKS_REQUIRED(cs, cs_main);
|
||||
void removeConflicts(const CTransaction &tx) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
void removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight,
|
||||
const CBlockIndex* p_block_index_new = nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs);
|
||||
|
|
|
|||
|
|
@ -73,10 +73,8 @@ const int64_t nStartupTime = GetTime();
|
|||
|
||||
#ifdef LIQUID
|
||||
const char * const BITCOIN_CONF_FILENAME = "liquid.conf";
|
||||
const char * const BITCOIN_PID_FILENAME = "liquid.pid";
|
||||
#else
|
||||
const char * const BITCOIN_CONF_FILENAME = "elements.conf";
|
||||
const char * const BITCOIN_PID_FILENAME = "elementsd.pid";
|
||||
#endif
|
||||
const char * const BITCOIN_SETTINGS_FILENAME = "settings.json";
|
||||
|
||||
|
|
|
|||
|
|
@ -3676,7 +3676,6 @@ RPCHelpMan signrawtransactionwithwallet()
|
|||
EnsureWalletIsUnlocked(pwallet);
|
||||
|
||||
// Fetch previous transactions (inputs):
|
||||
const auto& fedpegscripts = GetValidFedpegScripts(::ChainActive().Tip(), Params().GetConsensus(), true /* nextblock_validation */);
|
||||
std::map<COutPoint, Coin> coins;
|
||||
for (const CTxIn& txin : mtx.vin) {
|
||||
coins[txin.prevout]; // Create empty map entry keyed by prevout.
|
||||
|
|
@ -6520,7 +6519,6 @@ static RPCHelpMan issueasset()
|
|||
token_dest_blindpub = pwallet->GetBlindingPubKey(GetScriptForDestination(token_dest));
|
||||
}
|
||||
|
||||
uint256 dummyentropy;
|
||||
CAsset dummyasset;
|
||||
IssuanceDetails issuance_details;
|
||||
issuance_details.blind_issuance = blind_issuances;
|
||||
|
|
|
|||
|
|
@ -336,7 +336,11 @@ public:
|
|||
|
||||
// memory only
|
||||
enum AmountType { DEBIT, CREDIT, IMMATURE_CREDIT, AVAILABLE_CREDIT, AMOUNTTYPE_ENUM_ELEMENTS };
|
||||
CAmountMap GetCachableAmount(AmountType type, const isminefilter& filter, bool recalculate = false) const;
|
||||
// TODO: Remove "NO_THREAD_SAFETY_ANALYSIS" and replace it with the correct
|
||||
// annotation "EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)". The
|
||||
// annotation "NO_THREAD_SAFETY_ANALYSIS" was temporarily added to avoid
|
||||
// having to resolve the issue of member access into incomplete type CWallet.
|
||||
CAmountMap GetCachableAmount(AmountType type, const isminefilter& filter, bool recalculate = false) const NO_THREAD_SAFETY_ANALYSIS;
|
||||
mutable CachableAmountMap m_amounts[AMOUNTTYPE_ENUM_ELEMENTS];
|
||||
/**
|
||||
* This flag is true if all m_amounts caches are empty. This is particularly
|
||||
|
|
@ -485,7 +489,11 @@ public:
|
|||
// having to resolve the issue of member access into incomplete type CWallet.
|
||||
CAmountMap GetAvailableCredit(bool fUseCache=true, const isminefilter& filter=ISMINE_SPENDABLE) const NO_THREAD_SAFETY_ANALYSIS;
|
||||
CAmountMap GetImmatureWatchOnlyCredit(const bool fUseCache=true) const;
|
||||
CAmountMap GetChange() const;
|
||||
// TODO: Remove "NO_THREAD_SAFETY_ANALYSIS" and replace it with the correct
|
||||
// annotation "EXCLUSIVE_LOCKS_REQUIRED(pwallet->cs_wallet)". The
|
||||
// annotation "NO_THREAD_SAFETY_ANALYSIS" was temporarily added to avoid
|
||||
// having to resolve the issue of member access into incomplete type CWallet.
|
||||
CAmountMap GetChange() const NO_THREAD_SAFETY_ANALYSIS;
|
||||
|
||||
// Get the marginal bytes if spending the specified output from this transaction
|
||||
int GetSpendSize(unsigned int out, bool use_max_sig = false) const
|
||||
|
|
@ -836,7 +844,7 @@ public:
|
|||
* if they are not ours
|
||||
*/
|
||||
bool SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAmountMap& mapTargetValue, std::set<CInputCoin>& setCoinsRet, CAmountMap& mapValueRet,
|
||||
const CCoinControl& coin_control, CoinSelectionParams& coin_selection_params, bool& bnb_used) const;
|
||||
const CCoinControl& coin_control, CoinSelectionParams& coin_selection_params, bool& bnb_used) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
|
||||
/** Get a name for this wallet for logging/debugging purposes.
|
||||
*/
|
||||
|
|
@ -1183,8 +1191,8 @@ public:
|
|||
CAmountMap GetChange(const CTransaction& tx) const;
|
||||
|
||||
// ELEMENTS:
|
||||
CAmountMap GetCredit(const CWalletTx& wtx, const isminefilter& filter) const;
|
||||
CAmountMap GetChange(const CWalletTx& wtx) const;
|
||||
CAmountMap GetCredit(const CWalletTx& wtx, const isminefilter& filter) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
CAmountMap GetChange(const CWalletTx& wtx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
|
||||
void chainStateFlushed(const CBlockLocator& loc) override;
|
||||
|
||||
|
|
@ -1416,9 +1424,9 @@ public:
|
|||
// Pubkey accessor for GetBlindingKey
|
||||
CPubKey GetBlindingPubKey(const CScript& script) const;
|
||||
|
||||
bool LoadSpecificBlindingKey(const CScriptID& scriptid, const uint256& key);
|
||||
bool AddSpecificBlindingKey(const CScriptID& scriptid, const uint256& key);
|
||||
bool SetMasterBlindingKey(const uint256& key);
|
||||
bool LoadSpecificBlindingKey(const CScriptID& scriptid, const uint256& key) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
bool AddSpecificBlindingKey(const CScriptID& scriptid, const uint256& key) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
bool SetMasterBlindingKey(const uint256& key) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
|
||||
/// Returns a map of entropy to the respective pair of reissuance token and issuance asset.
|
||||
std::map<uint256, std::pair<CAsset, CAsset> > GetReissuanceTokenTypes() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue