mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
Merge bitcoin/bitcoin#33600: refactor: Construct g_verify_flag_names on first use
faa9d10c84refactor: Construct g_verify_flag_names on first use (MarcoFalke) Pull request description: The current usage of the `g_verify_flag_names` map seems fine and I can not see a static initialization order fiasco here. However, it seems brittle to hope this remains the case in the future. Also, it triggers a msan false-positive in the fuzz CI task. (C.f https://github.com/bitcoin-core/qa-assets/actions/runs/18352815555/job/52413137315?pr=241#step:7:5245) So just apply the "Construct on first use" idiom. ACKs for top commit: kevkevinpal: ACK [faa9d10](faa9d10c84) ajtowns: ACKfaa9d10c84janb84: lgtm ACKfaa9d10c84stickies-v: ACKfaa9d10c84Tree-SHA512: 6685dfc91c99a8245722e07fac99a7a6d58586c30964be7ccd74a176dfbf00c6255c8594621e2909640763924f51d3efd4ce65ed65eaeeb1d05c2fd01fe63604
This commit is contained in:
@@ -50,7 +50,7 @@ typedef std::vector<unsigned char> valtype;
|
||||
static CFeeRate g_dust{DUST_RELAY_TX_FEE};
|
||||
static bool g_bare_multi{DEFAULT_PERMIT_BAREMULTISIG};
|
||||
|
||||
static const std::map<std::string, script_verify_flag_name>& mapFlagNames = g_verify_flag_names;
|
||||
static const std::map<std::string, script_verify_flag_name>& mapFlagNames = ScriptFlagNamesToEnum();
|
||||
|
||||
script_verify_flags ParseScriptFlags(std::string strFlags)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user