diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-04-24 11:59:56 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-04-24 12:00:05 +0200 |
commit | b1c5991eebb916755be188f355ad36fe01a3f529 (patch) | |
tree | 4bfb9b0aa3a46e71bfb1ad26d4c332bb39f0291c /src/wallet | |
parent | be7a5f2fc400e7a3ef72dedbdcf49dd6c96d4f9e (diff) | |
parent | ee02c8bd9aedad8cfd3c2618035fe275da025fb9 (diff) |
Merge bitcoin/bitcoin#24812: util/check: Add CHECK_NONFATAL identity function and NONFATAL_UNREACHABLE macro
ee02c8bd9aedad8cfd3c2618035fe275da025fb9 util/check: Add CHECK_NONFATAL identity function, NONFATAL_UNREACHABLE AND UNREACHABLE macros (Aurèle Oulès)
Pull request description:
This PR replaces the macro `CHECK_NONFATAL` with an identity function.
I simplified the usage of `CHECK_NONFATAL` where applicable in `src/rpc`.
This function is useful in sanity checks for RPC and command-line interfaces.
Context: https://github.com/bitcoin/bitcoin/pull/24804#discussion_r846182474.
Also adds `UNREACHABLE_NONFATAL` macro.
ACKs for top commit:
jonatack:
ACK ee02c8bd9aedad8cfd3c2618035fe275da025fb9
MarcoFalke:
ACK ee02c8bd9aedad8cfd3c2618035fe275da025fb9 🍨
Tree-SHA512: 3cba09223cd7b22e62fe5d0b46c4a024c1d9957d4268ba6d3fb07fcc0a5854fc0886bb3266184e6a7df5df91373b3e84edd6adf6999c4e934aeef8c043b01aa2
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpc/backup.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index b048ddfc6e..7481072815 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -915,7 +915,7 @@ static std::string RecurseImportData(const CScript& script, ImportData& import_d case TxoutType::WITNESS_V1_TAPROOT: return "unrecognized script"; } // no default case, so the compiler can warn about missing cases - CHECK_NONFATAL(false); + NONFATAL_UNREACHABLE(); } static UniValue ProcessImportLegacy(ImportData& import_data, std::map<CKeyID, CPubKey>& pubkey_map, std::map<CKeyID, CKey>& privkey_map, std::set<CScript>& script_pub_keys, bool& have_solving_data, const UniValue& data, std::vector<CKeyID>& ordered_pubkeys) |