nostrdb: relay-index: fix a few bugs

There were a few race conditions and lmdb bugs in the
relay index implementation. Fix those!

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-03-21 13:27:37 -07:00
committed by Daniel D’Aquino
parent c29027ff5b
commit f0521ba406
3 changed files with 19 additions and 8 deletions

View File

@@ -715,7 +715,6 @@ static inline int cursor_align(struct cursor *cur, int bytes) {
// pad to n-byte alignment
pad = ((size + (bytes-1)) & ~(bytes-1)) - size;
if (pad > 0 && !cursor_memset(cur, 0, pad))
return 0;