mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
util/check: Add CHECK_NONFATAL identity function, NONFATAL_UNREACHABLE AND UNREACHABLE macros
This commit is contained in:
parent
e0680bbce8
commit
ee02c8bd9a
7 changed files with 49 additions and 39 deletions
|
|
@ -33,6 +33,7 @@
|
|||
#include <script/standard.h>
|
||||
#include <uint256.h>
|
||||
#include <util/bip32.h>
|
||||
#include <util/check.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/string.h>
|
||||
#include <util/vector.h>
|
||||
|
|
@ -466,7 +467,7 @@ static RPCHelpMan decodescript()
|
|||
// Should not be wrapped
|
||||
return false;
|
||||
} // no default case, so the compiler can warn about missing cases
|
||||
CHECK_NONFATAL(false);
|
||||
NONFATAL_UNREACHABLE();
|
||||
}()};
|
||||
if (can_wrap_P2WSH) {
|
||||
UniValue sr(UniValue::VOBJ);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue