From 919f644cba93c7a8571d96653777c1058762a350 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Wed, 17 Apr 2024 12:11:40 -0700 Subject: [PATCH] add assert to catch potential bug Signed-off-by: William Casarin --- nostrdb/src/block.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nostrdb/src/block.c b/nostrdb/src/block.c index 65f25e3e..6c2f22f5 100644 --- a/nostrdb/src/block.c +++ b/nostrdb/src/block.c @@ -185,6 +185,7 @@ struct nostr_bech32 *ndb_bech32_block(struct ndb_block *block) { // total size including padding size_t ndb_blocks_total_size(struct ndb_blocks *blocks) { + assert(blocks->total_size < 1000000); return blocks->total_size; }