mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
refactor: Mark some static global vars as const
These were found while looking for static mutable state in the kernel library.
This commit is contained in:
parent
39f9b80fba
commit
51fa26239a
@ -245,7 +245,7 @@ bool ParseHashStr(const std::string& strHex, uint256& result)
|
||||
|
||||
util::Result<int> SighashFromStr(const std::string& sighash)
|
||||
{
|
||||
static std::map<std::string, int> map_sighash_values = {
|
||||
static const std::map<std::string, int> map_sighash_values = {
|
||||
{std::string("DEFAULT"), int(SIGHASH_DEFAULT)},
|
||||
{std::string("ALL"), int(SIGHASH_ALL)},
|
||||
{std::string("ALL|ANYONECANPAY"), int(SIGHASH_ALL|SIGHASH_ANYONECANPAY)},
|
||||
|
@ -116,13 +116,13 @@ std::string DescriptorChecksum(const Span<const char>& span)
|
||||
* As a result, within-group-of-32 errors count as 1 symbol, as do cross-group errors that don't affect
|
||||
* the position within the groups.
|
||||
*/
|
||||
static std::string INPUT_CHARSET =
|
||||
static const std::string INPUT_CHARSET =
|
||||
"0123456789()[],'/*abcdefgh@:$%{}"
|
||||
"IJKLMNOPQRSTUVWXYZ&+-.;<=>?!^_|~"
|
||||
"ijklmnopqrstuvwxyzABCDEFGH`#\"\\ ";
|
||||
|
||||
/** The character set for the checksum itself (same as bech32). */
|
||||
static std::string CHECKSUM_CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
|
||||
static const std::string CHECKSUM_CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l";
|
||||
|
||||
uint64_t c = 1;
|
||||
int cls = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user