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

@@ -26,12 +26,12 @@ void push_le64(u64 v,
push(&l, sizeof(l), 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)
{
push_varint(len, push, pushp);
push(blob, len, pushp);
push_varint(tal_len(blob), push, pushp);
push(blob, tal_len(blob), pushp);
}
void push(const void *data, size_t len, void *pptr_)