nostrdb

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

commit 9b9c271627552dd322da31626eb220297f781a95
parent 837358654cc4d4d0f0b4b2604a1ed53794b1faeb
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 24 Jul 2023 14:56:45 -0700

add created_at to builder

Diffstat:
Mnostrdb.c | 5+++++
Mnostrdb.h | 1+
2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/nostrdb.c b/nostrdb.c @@ -548,6 +548,11 @@ void ndb_builder_set_kind(struct ndb_builder *builder, uint32_t kind) builder->note->kind = kind; } +void ndb_builder_set_created_at(struct ndb_builder *builder, uint32_t created_at) +{ + builder->note->created_at = created_at; +} + int ndb_builder_new_tag(struct ndb_builder *builder) { builder->note->tags.count++; diff --git a/nostrdb.h b/nostrdb.h @@ -82,6 +82,7 @@ int ndb_note_from_json(const char *json, int len, struct ndb_note **, unsigned c int ndb_builder_init(struct ndb_builder *builder, unsigned char *buf, int bufsize); int ndb_builder_finalize(struct ndb_builder *builder, struct ndb_note **note); int ndb_builder_set_content(struct ndb_builder *builder, const char *content, int len); +void ndb_builder_set_created_at(struct ndb_builder *builder, uint32_t created_at); void ndb_builder_set_signature(struct ndb_builder *builder, unsigned char *signature); void ndb_builder_set_pubkey(struct ndb_builder *builder, unsigned char *pubkey); void ndb_builder_set_id(struct ndb_builder *builder, unsigned char *id);