From fa6ef701adba1cb48535cac25fd43c742a82e40d Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 8 Jun 2020 08:47:10 -0400 Subject: util: Add Assert identity function The utility is primarily useful to dereference pointer types, which are known to be not null at that time. For example, the ArgsManager is known to exist when the wallets are started. Instead of silently relying on that assumption, Assert can be used to abort the program and avoid UB should the assumption ever be violated. --- src/test/util/mining.cpp | 4 ++-- src/test/util/setup_common.h | 1 + src/util/check.h | 12 +++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/test/util/mining.cpp b/src/test/util/mining.cpp index dac7f1a07b..b0c74954db 100644 --- a/src/test/util/mining.cpp +++ b/src/test/util/mining.cpp @@ -11,6 +11,7 @@ #include #include #include