nostrdb

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

commit 4a6f19ad8893cd3334b3ba95af35166790458021
parent f90c067e32e77a64c838fc73a0219190fb56ea63
Author: William Casarin <jb55@jb55.com>
Date:   Fri,  9 Feb 2024 15:09:23 -0800

filter: make sure clone copies metadata

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

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

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -519,6 +519,8 @@ int ndb_filter_clone(struct ndb_filter *dst, struct ndb_filter *src) { size_t src_size, elem_size, data_size; + memcpy(dst, src, sizeof(*src)); + elem_size = src->elem_buf.end - src->elem_buf.start; data_size = src->data_buf.end - src->data_buf.start; src_size = data_size + elem_size;