mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
refactor: Make CFeeRate(integral) ctor constexpr
This is required for the next commit. Also, in a test, use `inline constexpr` for an `auto` type, which is also needed for the next commit, which hard-codes a list of types for conversion.
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
||||
/** Fee rate of 0 satoshis per 0 vB */
|
||||
CFeeRate() = default;
|
||||
template<std::integral I> // Disallow silent float -> int conversion
|
||||
explicit CFeeRate(const I m_feerate_kvb) : m_feerate(FeePerVSize(m_feerate_kvb, 1000)) {}
|
||||
explicit constexpr CFeeRate(const I m_feerate_kvb) : m_feerate(FeePerVSize(m_feerate_kvb, 1000)) {}
|
||||
|
||||
/**
|
||||
* Construct a fee rate from a fee in satoshis and a vsize in vB.
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
const auto NoMalleation = [](AutoFile& file, node::SnapshotMetadata& meta){};
|
||||
inline constexpr auto NoMalleation = [](AutoFile& file, node::SnapshotMetadata& meta){};
|
||||
|
||||
/**
|
||||
* Create and activate a UTXO snapshot, optionally providing a function to
|
||||
|
||||
Reference in New Issue
Block a user