nostrdb/blocks: expose block iterator internals
so we don't need heap allocation. we will be calling this a lot in tight render loops, we don't want to be allocating on each frame. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
d063362bd7
commit
c677233dcb
@@ -4,18 +4,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "cursor.h"
|
||||
#include "nostrdb.h"
|
||||
|
||||
struct bolt11;
|
||||
|
||||
struct ndb_invoice {
|
||||
unsigned char version;
|
||||
uint64_t amount;
|
||||
uint64_t timestamp;
|
||||
uint64_t expiry;
|
||||
char *description;
|
||||
unsigned char *description_hash;
|
||||
};
|
||||
|
||||
// ENCODING
|
||||
int ndb_encode_invoice(struct cursor *cur, struct bolt11 *invoice);
|
||||
int ndb_decode_invoice(struct cursor *cur, struct ndb_invoice *invoice);
|
||||
|
||||
Reference in New Issue
Block a user