diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2023-04-25 17:04:11 +0100 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2023-05-26 15:47:55 -0700 |
commit | b9f1e86f129e46bb5770fb421d0ba164b5c7aaf8 (patch) | |
tree | 53f0859cf45f9242312e85491b4bcf1fd7dbee3c /src/addrman_impl.h | |
parent | 768770771f7db60147943152b34a8dd485cdcc76 (diff) | |
download | bitcoin-b9f1e86f129e46bb5770fb421d0ba164b5c7aaf8.tar.xz |
addrman: change asserts to Assumes
`Assume` is safer since the checks are non-fatal- errors in these functions
should provide feedback in debug builds, but do not need to deter further node
operations in production.
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r-- | src/addrman_impl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h index 7aead2812b..9aff408e34 100644 --- a/src/addrman_impl.h +++ b/src/addrman_impl.h @@ -255,7 +255,7 @@ private: /** Helper to generalize looking up an addrman entry from either table. * - * @return int The nid of the entry or -1 if the addrman position is empty. + * @return int The nid of the entry. If the addrman position is empty or not found, returns -1. * */ int GetEntry(bool use_tried, size_t bucket, size_t position) const EXCLUSIVE_LOCKS_REQUIRED(cs); |