nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit a8b9b3f9ecf2b6e15ccf854b6635b680f787a330
parent 5b6a20c6c0827a864bac29a88bdcc6e35ce7479f
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 12 Jun 2025 09:31:11 -0700

cleanup previous patch

I wanted to not amend this since we've already applied
it in the nostrdb-update branch on damus and I don't want
to conflict

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/nostrdb.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -8144,6 +8144,7 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note) const char *content; size_t content_len; struct ndb_blocks *blocks; + unsigned char *buffer; content = ndb_note_content(note); content_len = ndb_note_content_length(note); @@ -8152,7 +8153,7 @@ static struct ndb_blocks *ndb_note_to_blocks(struct ndb_note *note) if (content_len >= INT32_MAX) return NULL; - unsigned char *buffer = malloc(2<<18); // Not carefully calculated, but ok because we will not need this once we switch to the local relay model + buffer = malloc(2<<18); // Not carefully calculated, but ok because we will not need this once we switch to the local relay model if (!buffer) return NULL;