Anthony Towns
2ef47ba6c5
util/check: stop using lambda for Assert/Assume
2022-03-30 23:09:13 +10:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
MarcoFalke
fa77f95c2f
fuzz: Fix RPC internal bug detection
2021-12-08 14:20:16 +01:00
MarcoFalke
fa4cebadcf
util: Make Assume() usable as unary expression
2021-03-04 12:03:50 +01:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
MarcoFalke
faa05854f8
util: Remove probably misleading TODO
...
The TODO has been added by me, but I don't remember how to solve it. The
current code works fine, so just remove the TODO.
2020-11-24 10:09:48 +01:00
MarcoFalke
fac5efe730
util: Add Assume() identity function
2020-11-24 09:47:29 +01:00
practicalswift
fa861569dc
util: Allow Assert(...) to be used in all contexts
...
Fixes the compile error when used inside operator[]:
./chain.h:404:23: error: C++11 only allows consecutive left square brackets when introducing an attribute
return (*this)[Assert(pindex)->nHeight] == pindex;
^
2020-11-24 09:46:49 +01:00
MarcoFalke
fa53635381
util: Make Assert work with any value
2020-07-11 15:02:07 +02:00
MarcoFalke
fa6ef701ad
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.
2020-06-15 07:39:08 -04:00
MarcoFalke
fa457fbd33
move-only: Move NDEBUG compile time check to util/check
2020-06-14 13:58:02 -04:00
Russell Yanofsky
691c817b34
Add util::Ref class as temporary alternative for c++17 std::any
...
This commit does not change behavior
2020-05-13 16:20:13 -04:00
MarcoFalke
faeb666536
util: Add CHECK_NONFATAL and use it in src/rpc
2019-10-18 17:19:36 -04:00