struct bitcoin_tx: remove explicit lengths, use tal_len()/tal_count()

They're always tal objects, so we can simply ask tal for the length,
simplifying the API.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-01-25 10:05:43 +10:30
parent ad82d29379
commit 8522a5ea64
20 changed files with 166 additions and 187 deletions

View File

@@ -2,12 +2,13 @@
#define LIGHTNING_BITCOIN_PULLPUSH_H
#include "config.h"
#include "bitcoin/varint.h"
#include <ccan/tal/tal.h>
void push_varint(varint_t v,
void (*push)(const void *, size_t, void *), void *pushp);
void push_le32(u32 v, void (*push)(const void *, size_t, void *), void *pushp);
void push_le64(u64 v, void (*push)(const void *, size_t, void *), void *pushp);
void push_varint_blob(const void *blob, varint_t len,
void push_varint_blob(const tal_t *blob,
void (*push)(const void *, size_t, void *),
void *pushp);