nostrdb/blocks: add total_size
Fix this mistake that we have with ndb_notes where we don't know the total size of the object Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
c2c73c3af6
commit
c831976078
@@ -196,3 +196,8 @@ uint32_t ndb_str_block_len(struct ndb_str_block *str_block) {
|
||||
struct nostr_bech32 *ndb_bech32_block(struct ndb_block *block) {
|
||||
return &block->block.mention_bech32.bech32;
|
||||
}
|
||||
|
||||
// total size including padding
|
||||
size_t ndb_blocks_total_size(struct ndb_blocks *blocks) {
|
||||
return blocks->total_size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user