Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions doc/build-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,20 +272,16 @@ A list of additional configure flags can be displayed with:

Setup and Build Example: Arch Linux
-----------------------------------
This example lists the steps necessary to setup and build a command line only, non-wallet distribution of the latest changes on Arch Linux:
This example lists the steps necessary to setup and build a command line only distribution of the latest changes on Arch Linux:

```sh
pacman -S git base-devel boost libevent python
pacman --sync --needed autoconf automake boost gcc git libevent libtool make pkgconf python sqlite
git clone https://github.com/dashpay/dash.git
cd dash/
./autogen.sh
./configure --disable-wallet --without-gui --without-miniupnpc
./configure
make check
./src/dashd
```

Note:
Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`,
or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using
`--with-incompatible-bdb` according to the [PKGBUILD](https://github.com/archlinux/svntogit-community/blob/packages/bitcoin/trunk/PKGBUILD).
As mentioned above, when maintaining portability of the wallet between the standard Dash Core distributions and independently built
node software is desired, Berkeley DB 4.8 must be used.
If you intend to work with legacy Berkeley DB wallets, see [Berkeley DB](#berkeley-db) section.
5 changes: 5 additions & 0 deletions doc/release-notes/release-notes-24408.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
New RPCs
--------

- A new `gettxspendingprevout` RPC has been added, which scans the mempool to find
transactions spending any of the given outpoints. (#24408)
2 changes: 2 additions & 0 deletions src/.clang-tidy
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
Checks: '
-*,
bugprone-argument-comment,
modernize-use-default-member-init,
modernize-use-nullptr,
readability-const-return-type,
readability-redundant-declaration,
readability-redundant-string-init,
'
WarningsAsErrors: '
bugprone-argument-comment,
modernize-use-default-member-init,
modernize-use-nullptr,
readability-redundant-declaration,
readability-redundant-string-init,
Expand Down
1 change: 0 additions & 1 deletion src/base58.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifndef BITCOIN_BASE58_H
#define BITCOIN_BASE58_H

#include <attributes.h>
#include <span.h>

#include <string>
Expand Down
3 changes: 1 addition & 2 deletions src/bench/checkqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)

struct PrevectorJob {
prevector<PREVECTOR_SIZE, uint8_t> p;
PrevectorJob(){
}
PrevectorJob() = default;
explicit PrevectorJob(FastRandomContext& insecure_rand){
p.resize(insecure_rand.randrange(PREVECTOR_SIZE*2));
}
Expand Down
4 changes: 2 additions & 2 deletions src/bench/prevector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
#include <bench/bench.h>

struct nontrivial_t {
int x;
nontrivial_t() :x(-1) {}
int x{-1};
nontrivial_t() = default;
SERIALIZE_METHODS(nontrivial_t, obj) { READWRITE(obj.x); }
};
typedef prevector<28, unsigned char> prevec;
Expand Down
2 changes: 1 addition & 1 deletion src/bench/wallet_loading.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using wallet::WALLET_FLAG_DESCRIPTORS;
using wallet::WalletContext;
using wallet::WalletDatabase;

static const std::shared_ptr<CWallet> BenchLoadWallet(std::unique_ptr<WalletDatabase> database, WalletContext& context, DatabaseOptions& options)
static std::shared_ptr<CWallet> BenchLoadWallet(std::unique_ptr<WalletDatabase> database, WalletContext& context, DatabaseOptions& options)
{
bilingual_str error;
std::vector<bilingual_str> warnings;
Expand Down
8 changes: 4 additions & 4 deletions src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ static int AppInitRPC(int argc, char* argv[])
/** Reply structure for request_done to fill in */
struct HTTPReply
{
HTTPReply(): status(0), error(-1) {}
HTTPReply() = default;

int status;
int error;
int status{0};
int error{-1};
std::string body;
};

Expand Down Expand Up @@ -263,7 +263,7 @@ static void http_error_cb(enum evhttp_request_error err, void *ctx)
class BaseRequestHandler
{
public:
virtual ~BaseRequestHandler() {}
virtual ~BaseRequestHandler() = default;
virtual UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) = 0;
virtual UniValue ProcessReply(const UniValue &batch_in) = 0;
};
Expand Down
1 change: 0 additions & 1 deletion src/core_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_CORE_IO_H
#define BITCOIN_CORE_IO_H

#include <attributes.h>
#include <consensus/amount.h>

#include <string>
Expand Down
18 changes: 9 additions & 9 deletions src/evo/netinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@ class NetInfoEntry

public:
NetInfoEntry() = default;
NetInfoEntry(const DomainPort& domain)
explicit NetInfoEntry(const DomainPort& domain)
{
if (!domain.IsValid()) return;
m_type = NetInfoType::Domain;
m_data = domain;
}
NetInfoEntry(const CService& service)
explicit NetInfoEntry(const CService& service)
{
if (!service.IsValid()) return;
m_type = NetInfoType::Service;
m_data = service;
}
template <typename Stream>
NetInfoEntry(deserialize_type, Stream& s) { s >> *this; }
explicit NetInfoEntry(deserialize_type, Stream& s) { s >> *this; }

~NetInfoEntry() = default;

Expand All @@ -220,12 +220,12 @@ class NetInfoEntry
void Serialize(Stream& s_) const
{
OverrideStream<Stream> s(&s_, /*nType=*/0, s_.GetVersion() | ADDRV2_FORMAT);
if (const auto* data_ptr{std::get_if<CService>(&m_data)};
m_type == NetInfoType::Service && data_ptr && data_ptr->IsValid()) {
s << m_type << *data_ptr;
} else if (const auto* data_ptr{std::get_if<DomainPort>(&m_data)};
m_type == NetInfoType::Domain && data_ptr && data_ptr->IsValid()) {
s << m_type << *data_ptr;
if (const auto* data_ptr_service{std::get_if<CService>(&m_data)};
m_type == NetInfoType::Service && data_ptr_service && data_ptr_service->IsValid()) {
s << m_type << *data_ptr_service;
} else if (const auto* data_ptr_domain{std::get_if<DomainPort>(&m_data)};
m_type == NetInfoType::Domain && data_ptr_domain && data_ptr_domain->IsValid()) {
s << m_type << *data_ptr_domain;
} else {
s << NetInfoType::Invalid;
}
Expand Down
8 changes: 3 additions & 5 deletions src/httpserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,18 @@ class WorkQueue
std::condition_variable cond GUARDED_BY(cs);
std::deque<std::unique_ptr<WorkItem>> queue GUARDED_BY(cs);
std::deque<std::unique_ptr<WorkItem>> external_queue GUARDED_BY(cs);
bool running GUARDED_BY(cs);
bool running GUARDED_BY(cs){true};
const size_t maxDepth;
const size_t m_external_depth;

public:
explicit WorkQueue(size_t _maxDepth, size_t external_depth) : running(true),
explicit WorkQueue(size_t _maxDepth, size_t external_depth) :
maxDepth(_maxDepth), m_external_depth(external_depth)
{
}
/** Precondition: worker threads have all stopped (they have been joined).
*/
~WorkQueue()
{
}
~WorkQueue() = default;
/** Enqueue a work item */
bool Enqueue(WorkItem* item, bool is_external) EXCLUSIVE_LOCKS_REQUIRED(!cs)
{
Expand Down
2 changes: 1 addition & 1 deletion src/index/txindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ TxIndex::TxIndex(size_t n_cache_size, bool f_memory, bool f_wipe)
: m_db(std::make_unique<TxIndex::DB>(n_cache_size, f_memory, f_wipe))
{}

TxIndex::~TxIndex() {}
TxIndex::~TxIndex() = default;

bool TxIndex::WriteBlock(const CBlock& block, const CBlockIndex* pindex)
{
Expand Down
1 change: 0 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
#include <vector>

#ifndef WIN32
#include <attributes.h>
#include <cerrno>
#include <signal.h>
#include <sys/stat.h>
Expand Down
3 changes: 2 additions & 1 deletion src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,9 @@ void BCLog::Logger::LogPrintStr(const std::string& str, const std::string& loggi
}

if (m_log_threadnames && m_started_new_line) {
const auto threadname = util::ThreadGetInternalName();
// 16 chars total, "dash-" is 5 of them and another 1 is a NUL terminator
str_prefixed.insert(0, "[" + strprintf("%10s", util::ThreadGetInternalName()) + "] ");
str_prefixed.insert(0, "[" + strprintf("%10s", (threadname.empty() ? "unknown" : threadname)) + "] ");
}

str_prefixed = LogTimestampStr(str_prefixed);
Expand Down
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4064,7 +4064,7 @@ bool CConnman::Start(CDeterministicMNManager& dmnman, CMasternodeMetaMan& mn_met
class CNetCleanup
{
public:
CNetCleanup() {}
CNetCleanup() = default;

~CNetCleanup()
{
Expand Down
2 changes: 1 addition & 1 deletion src/netaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ bool fAllowPrivateNet = DEFAULT_ALLOWPRIVATENET;
*
* @note This address is considered invalid by CNetAddr::IsValid()
*/
CNetAddr::CNetAddr() {}
CNetAddr::CNetAddr() = default;

void CNetAddr::SetIP(const CNetAddr& ipIn)
{
Expand Down
1 change: 0 additions & 1 deletion src/netaddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <config/bitcoin-config.h>
#endif

#include <attributes.h>
#include <compat/compat.h>
#include <crypto/siphash.h>
#include <prevector.h>
Expand Down
4 changes: 2 additions & 2 deletions src/node/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
#include <validation.h>

namespace node {
NodeContext::NodeContext() {}
NodeContext::~NodeContext() {}
NodeContext::NodeContext() = default;
NodeContext::~NodeContext() = default;
} // namespace node
1 change: 0 additions & 1 deletion src/node/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_NODE_TRANSACTION_H
#define BITCOIN_NODE_TRANSACTION_H

#include <attributes.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <util/error.h>
Expand Down
4 changes: 1 addition & 3 deletions src/policy/fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,9 +568,7 @@ CBlockPolicyEstimator::CBlockPolicyEstimator()
}
}

CBlockPolicyEstimator::~CBlockPolicyEstimator()
{
}
CBlockPolicyEstimator::~CBlockPolicyEstimator() = default;

void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, bool validFeeEstimate)
{
Expand Down
1 change: 0 additions & 1 deletion src/psbt.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_PSBT_H
#define BITCOIN_PSBT_H

#include <attributes.h>
#include <node/transaction.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
Expand Down
2 changes: 1 addition & 1 deletion src/qt/addresstablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct AddressTableEntry
QString label;
QString address;

AddressTableEntry() {}
AddressTableEntry() = default;
AddressTableEntry(Type _type, const QString &_label, const QString &_address):
type(_type), label(_label), address(_address) {}
};
Expand Down
5 changes: 1 addition & 4 deletions src/qt/bantablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ BanTableModel::BanTableModel(interfaces::Node& node, QObject* parent) :
refresh();
}

BanTableModel::~BanTableModel()
{
// Intentionally left empty
}
BanTableModel::~BanTableModel() = default;

int BanTableModel::rowCount(const QModelIndex &parent) const
{
Expand Down
9 changes: 4 additions & 5 deletions src/qt/bitcoinamountfield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ static CAmount parse(const QString &text, BitcoinUnit nUnit, bool *valid_out= nu
class AmountValidator : public QValidator
{
Q_OBJECT
BitcoinUnit currentUnit;
BitcoinUnit currentUnit{BitcoinUnit::DASH};

public:
explicit AmountValidator(QObject *parent) :
QValidator(parent),
currentUnit(BitcoinUnit::DASH) {}
QValidator(parent)
{}

State validate(QString &input, int &pos) const override
{
Expand All @@ -70,8 +70,7 @@ class AmountLineEdit: public QLineEdit
AmountValidator* amountValidator;
public:
explicit AmountLineEdit(QWidget *parent):
QLineEdit(parent),
currentUnit(BitcoinUnit::DASH)
QLineEdit(parent)
{
setAlignment(Qt::AlignLeft);
amountValidator = new AmountValidator(this);
Expand Down
6 changes: 3 additions & 3 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ bool isStyleSheetDirectoryCustom()
return stylesheetDirectory != defaultStylesheetDirectory;
}

const std::vector<QString> listStyleSheets()
std::vector<QString> listStyleSheets()
{
std::vector<QString> vecStylesheets;
for (const auto& it : mapThemeToStyle) {
Expand All @@ -895,7 +895,7 @@ const std::vector<QString> listStyleSheets()
return vecStylesheets;
}

const std::vector<QString> listThemes()
std::vector<QString> listThemes()
{
std::vector<QString> vecThemes;
for (const auto& it : mapThemeToStyle) {
Expand All @@ -905,7 +905,7 @@ const std::vector<QString> listThemes()
return vecThemes;
}

const QString getDefaultTheme()
QString getDefaultTheme()
{
return defaultTheme;
}
Expand Down
6 changes: 3 additions & 3 deletions src/qt/guiutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ namespace GUIUtil
bool isStyleSheetDirectoryCustom();

/** Return a list of all required css files */
const std::vector<QString> listStyleSheets();
std::vector<QString> listStyleSheets();

/** Return a list of all theme css files */
const std::vector<QString> listThemes();
std::vector<QString> listThemes();

/** Return the name of the default theme `*/
const QString getDefaultTheme();
QString getDefaultTheme();

/** Check if the given theme name is valid or not */
bool isValidTheme(const QString& strTheme);
Expand Down
2 changes: 1 addition & 1 deletion src/qt/notificator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Notificator::~Notificator()
class FreedesktopImage
{
public:
FreedesktopImage() {}
FreedesktopImage() = default;
explicit FreedesktopImage(const QImage &img);

// Image to variant that can be marshalled over DBus
Expand Down
4 changes: 2 additions & 2 deletions src/qt/overviewpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TxViewDelegate : public QAbstractItemDelegate
Q_OBJECT
public:
explicit TxViewDelegate(QObject* parent = nullptr)
: QAbstractItemDelegate(parent), unit(BitcoinUnit::DASH)
: QAbstractItemDelegate(parent)
{
connect(this, &TxViewDelegate::width_changed, this, &TxViewDelegate::sizeHintChanged);
}
Expand Down Expand Up @@ -126,7 +126,7 @@ class TxViewDelegate : public QAbstractItemDelegate
return {ITEM_HEIGHT + 8 + minimum_text_width, ITEM_HEIGHT};
}

BitcoinUnit unit;
BitcoinUnit unit{BitcoinUnit::DASH};

Q_SIGNALS:
//! An intermediate signal for emitting from the `paint() const` member function.
Expand Down
Loading
Loading