From 0f3a2532c38074dd9789d1c4c667db6ca46ff0ab Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Fri, 1 Jul 2022 00:08:14 -0400 Subject: [PATCH] validationcaches: Use size_t for sizes ...also move the 0-clamping logic to ApplyArgsManOptions, where it belongs. --- src/cuckoocache.h | 2 +- src/kernel/validation_cache_sizes.h | 6 +++--- src/node/validation_cache_args.cpp | 14 ++++++++++---- src/script/sigcache.cpp | 8 ++------ src/script/sigcache.h | 2 +- src/validation.cpp | 7 ++----- src/validation.h | 2 +- 7 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/cuckoocache.h b/src/cuckoocache.h index b5da87136d..61f553806e 100644 --- a/src/cuckoocache.h +++ b/src/cuckoocache.h @@ -328,7 +328,7 @@ public: } /** setup initializes the container to store no more than new_size - * elements. + * elements and no less than 2 elements. * * setup should only be called once. * diff --git a/src/kernel/validation_cache_sizes.h b/src/kernel/validation_cache_sizes.h index cf92cdbd64..72e4d1a52c 100644 --- a/src/kernel/validation_cache_sizes.h +++ b/src/kernel/validation_cache_sizes.h @@ -7,13 +7,13 @@ #include