diff --git a/src/addresstype.h b/src/addresstype.h index 862049dec73..79fcf3d1db5 100644 --- a/src/addresstype.h +++ b/src/addresstype.h @@ -118,7 +118,7 @@ public: }; /** Witness program for Pay-to-Anchor output script type */ -static const std::vector ANCHOR_BYTES{0x4e, 0x73}; +inline const std::vector ANCHOR_BYTES{0x4e, 0x73}; struct PayToAnchor : public WitnessUnknown { diff --git a/src/net.h b/src/net.h index 16ae5a6522a..ea0c651d11e 100644 --- a/src/net.h +++ b/src/net.h @@ -82,7 +82,7 @@ inline constexpr unsigned int DEFAULT_MAX_PEER_CONNECTIONS{200}; /** Default percentage of inbound connection slots that tx-relaying peers can use */ inline constexpr int DEFAULT_FULL_RELAY_INBOUND_PCT{50}; /** The default for -maxuploadtarget. 0 = Unlimited */ -static const std::string DEFAULT_MAX_UPLOAD_TARGET{"0M"}; +inline const std::string DEFAULT_MAX_UPLOAD_TARGET{"0M"}; /** Default for blocks only*/ inline constexpr bool DEFAULT_BLOCKSONLY = false; /** -peertimeout default */ diff --git a/src/netbase.h b/src/netbase.h index ae85eebda41..3bde9ad4471 100644 --- a/src/netbase.h +++ b/src/netbase.h @@ -30,7 +30,7 @@ inline constexpr int DEFAULT_CONNECT_TIMEOUT = 5000; inline constexpr int DEFAULT_NAME_LOOKUP = true; /** Prefix for unix domain socket addresses (which are local filesystem paths) */ -const std::string ADDR_PREFIX_UNIX = "unix:"; +inline const std::string ADDR_PREFIX_UNIX = "unix:"; enum class ConnectionDirection { None = 0, diff --git a/src/node/utxo_snapshot.h b/src/node/utxo_snapshot.h index 8807c27edf5..12a451808b3 100644 --- a/src/node/utxo_snapshot.h +++ b/src/node/utxo_snapshot.h @@ -110,7 +110,7 @@ public: //! //! Because we only allow loading a single snapshot at a time, there will only be one //! chainstate directory with this filename present within it. -const fs::path SNAPSHOT_BLOCKHASH_FILENAME{"base_blockhash"}; +inline const fs::path SNAPSHOT_BLOCKHASH_FILENAME{"base_blockhash"}; //! Write out the blockhash of the snapshot base block that was used to construct //! this chainstate. This value is read in during subsequent initializations and diff --git a/src/policy/feerate.h b/src/policy/feerate.h index c397a5c23ac..965edf25f22 100644 --- a/src/policy/feerate.h +++ b/src/policy/feerate.h @@ -16,8 +16,8 @@ #include #include -const std::string CURRENCY_UNIT = "BTC"; // One formatted unit -const std::string CURRENCY_ATOM = "sat"; // One indivisible minimum value unit +inline const std::string CURRENCY_UNIT = "BTC"; // One formatted unit +inline const std::string CURRENCY_ATOM = "sat"; // One indivisible minimum value unit enum class FeeRateFormat { BTC_KVB, //!< Use BTC/kvB fee rate unit diff --git a/src/script/miniscript.h b/src/script/miniscript.h index f0867acf3ee..b088619fb47 100644 --- a/src/script/miniscript.h +++ b/src/script/miniscript.h @@ -342,15 +342,15 @@ struct InputStack { }; /** A stack consisting of a single zero-length element (interpreted as 0 by the script interpreter in numeric context). */ -static const auto ZERO = InputStack(std::vector()); +inline const auto ZERO = InputStack(std::vector()); /** A stack consisting of a single malleable 32-byte 0x0000...0000 element (for dissatisfying hash challenges). */ -static const auto ZERO32 = InputStack(std::vector(32, 0)).SetMalleable(); +inline const auto ZERO32 = InputStack(std::vector(32, 0)).SetMalleable(); /** A stack consisting of a single 0x01 element (interpreted as 1 by the script interpreted in numeric context). */ -static const auto ONE = InputStack(Vector((unsigned char)1)); +inline const auto ONE = InputStack(Vector((unsigned char)1)); /** The empty stack. */ -static const auto EMPTY = InputStack(); +inline const auto EMPTY = InputStack(); /** A stack representing the lack of any (dis)satisfactions. */ -static const auto INVALID = InputStack().SetAvailable(Availability::NO); +inline const auto INVALID = InputStack().SetAvailable(Availability::NO); //! A pair of a satisfaction and a dissatisfaction InputStack. struct InputResult { diff --git a/src/test/util/script.h b/src/test/util/script.h index 44d9acd9197..e3b58118384 100644 --- a/src/test/util/script.h +++ b/src/test/util/script.h @@ -9,8 +9,8 @@ #include