mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
psbt: add serialize to/from wire for psbts
This commit is contained in:
parent
5d0fc176e8
commit
559f88faa1
20 changed files with 168 additions and 1 deletions
|
@ -1,10 +1,10 @@
|
|||
#include <assert.h>
|
||||
#include <bitcoin/psbt.h>
|
||||
#include <ccan/cast/cast.h>
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <string.h>
|
||||
#include <wally_psbt.h>
|
||||
#include <wally_transaction.h>
|
||||
#include <wire/wire.h>
|
||||
|
||||
#define MAKE_ROOM(arr, pos, num) \
|
||||
memmove((arr) + (pos) + 1, (arr) + (pos), \
|
||||
|
@ -137,3 +137,56 @@ void psbt_rm_output(struct wally_psbt *psbt,
|
|||
REMOVE_ELEM(psbt->outputs, remove_at, psbt->num_outputs);
|
||||
psbt->num_outputs -= 1;
|
||||
}
|
||||
|
||||
void towire_psbt(u8 **pptr, const struct wally_psbt *psbt)
|
||||
{
|
||||
/* Let's include the PSBT bytes */
|
||||
for (size_t room = 1024; room < 1024 * 1000; room *= 2) {
|
||||
u8 *pbt_bytes = tal_arr(NULL, u8, room);
|
||||
size_t bytes_written;
|
||||
if (wally_psbt_to_bytes(psbt, pbt_bytes, room, &bytes_written) == WALLY_OK) {
|
||||
towire_u32(pptr, bytes_written);
|
||||
towire_u8_array(pptr, pbt_bytes, bytes_written);
|
||||
tal_free(pbt_bytes);
|
||||
return;
|
||||
}
|
||||
tal_free(pbt_bytes);
|
||||
}
|
||||
/* PSBT is too big */
|
||||
abort();
|
||||
}
|
||||
|
||||
struct wally_psbt *fromwire_psbt(const tal_t *ctx,
|
||||
const u8 **cursor, size_t *max)
|
||||
{
|
||||
struct wally_psbt *psbt;
|
||||
u32 psbt_byte_len;
|
||||
const u8 *psbt_buf;
|
||||
|
||||
psbt_byte_len = fromwire_u32(cursor, max);
|
||||
psbt_buf = fromwire(cursor, max, NULL, psbt_byte_len);
|
||||
if (!psbt_buf)
|
||||
return NULL;
|
||||
|
||||
if (wally_psbt_from_bytes(psbt_buf, psbt_byte_len, &psbt) != WALLY_OK)
|
||||
return fromwire_fail(cursor, max);
|
||||
|
||||
/* We promised it would be owned by ctx: libwally uses a dummy owner */
|
||||
tal_steal(ctx, psbt);
|
||||
tal_add_destructor(psbt, psbt_destroy);
|
||||
|
||||
#if DEVELOPER
|
||||
/* Re-marshall for sanity check! */
|
||||
u8 *tmpbuf = tal_arr(NULL, u8, psbt_byte_len);
|
||||
size_t written;
|
||||
if (wally_psbt_to_bytes(psbt, tmpbuf, psbt_byte_len, &written) != WALLY_OK) {
|
||||
tal_free(tmpbuf);
|
||||
tal_free(psbt);
|
||||
return fromwire_fail(cursor, max);
|
||||
}
|
||||
tal_free(tmpbuf);
|
||||
#endif
|
||||
|
||||
return psbt;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef LIGHTNING_BITCOIN_PSBT_H
|
||||
#define LIGHTNING_BITCOIN_PSBT_H
|
||||
#include "config.h"
|
||||
#include <ccan/short_types/short_types.h>
|
||||
#include <ccan/tal/tal.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
@ -29,4 +30,7 @@ struct wally_psbt_output *psbt_add_output(struct wally_psbt *psbt,
|
|||
void psbt_rm_output(struct wally_psbt *psbt,
|
||||
size_t remove_at);
|
||||
|
||||
void towire_psbt(u8 **pptr, const struct wally_psbt *psbt);
|
||||
struct wally_psbt *fromwire_psbt(const tal_t *ctx,
|
||||
const u8 **curosr, size_t *max);
|
||||
#endif /* LIGHTNING_BITCOIN_PSBT_H */
|
||||
|
|
|
@ -27,6 +27,9 @@ bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
|
|||
struct amount_sat a UNNEEDED,
|
||||
struct amount_sat b UNNEEDED)
|
||||
{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
|
||||
/* Generated stub for fromwire */
|
||||
const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_amount_sat */
|
||||
struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); }
|
||||
|
@ -43,6 +46,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_amount_sat */
|
||||
void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED)
|
||||
{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); }
|
||||
|
@ -52,6 +58,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u8_array */
|
||||
void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
|
||||
|
|
|
@ -28,6 +28,9 @@ bool amount_sat_eq(struct amount_sat a UNNEEDED, struct amount_sat b UNNEEDED)
|
|||
struct amount_sat a UNNEEDED,
|
||||
struct amount_sat b UNNEEDED)
|
||||
{ fprintf(stderr, "amount_sat_sub called!\n"); abort(); }
|
||||
/* Generated stub for fromwire */
|
||||
const u8 *fromwire(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, void *copy UNNEEDED, size_t n UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_amount_sat */
|
||||
struct amount_sat fromwire_amount_sat(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_amount_sat called!\n"); abort(); }
|
||||
|
@ -44,6 +47,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_amount_sat */
|
||||
void towire_amount_sat(u8 **pptr UNNEEDED, const struct amount_sat sat UNNEEDED)
|
||||
{ fprintf(stderr, "towire_amount_sat called!\n"); abort(); }
|
||||
|
@ -53,6 +59,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u8_array */
|
||||
void towire_u8_array(u8 **pptr UNNEEDED, const u8 *arr UNNEEDED, size_t num UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u8_array called!\n"); abort(); }
|
||||
|
|
|
@ -652,6 +652,10 @@ struct bitcoin_tx *fromwire_bitcoin_tx(const tal_t *ctx,
|
|||
if (!tx)
|
||||
return fromwire_fail(cursor, max);
|
||||
|
||||
/* pull_bitcoin_tx sets the psbt */
|
||||
tal_free(tx->psbt);
|
||||
tx->psbt = fromwire_psbt(tx, cursor, max);
|
||||
|
||||
input_amts_len = fromwire_u16(cursor, max);
|
||||
|
||||
/* They must give us none or all */
|
||||
|
@ -682,6 +686,7 @@ void towire_bitcoin_tx(u8 **pptr, const struct bitcoin_tx *tx)
|
|||
u8 *lin = linearize_tx(tmpctx, tx);
|
||||
towire_u8_array(pptr, lin, tal_count(lin));
|
||||
|
||||
towire_psbt(pptr, tx->psbt);
|
||||
/* We only want to 'save' the amounts if every amount
|
||||
* has been populated */
|
||||
for (i = 0; i < tal_count(tx->input_amounts); i++) {
|
||||
|
|
|
@ -27,6 +27,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -49,6 +52,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -58,6 +58,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -105,6 +108,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -53,6 +53,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -78,6 +81,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -54,6 +54,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -79,6 +82,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -53,6 +53,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -78,6 +81,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -49,6 +49,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -52,6 +52,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -80,6 +83,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -50,6 +50,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -97,6 +100,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -55,6 +55,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -80,6 +83,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -54,6 +54,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -79,6 +82,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -51,6 +51,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -76,6 +79,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -57,6 +57,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -82,6 +85,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -57,6 +57,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -82,6 +85,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -75,6 +75,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -272,6 +275,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
|
@ -76,6 +76,9 @@ u8 *fromwire_tal_arrn(const tal_t *ctx UNNEEDED,
|
|||
/* Generated stub for fromwire_u16 */
|
||||
u16 fromwire_u16(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u32 */
|
||||
u32 fromwire_u32(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for fromwire_u64 */
|
||||
u64 fromwire_u64(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
|
||||
{ fprintf(stderr, "fromwire_u64 called!\n"); abort(); }
|
||||
|
@ -290,6 +293,9 @@ void towire_sha256(u8 **pptr UNNEEDED, const struct sha256 *sha256 UNNEEDED)
|
|||
/* Generated stub for towire_u16 */
|
||||
void towire_u16(u8 **pptr UNNEEDED, u16 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u16 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u32 */
|
||||
void towire_u32(u8 **pptr UNNEEDED, u32 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u32 called!\n"); abort(); }
|
||||
/* Generated stub for towire_u64 */
|
||||
void towire_u64(u8 **pptr UNNEEDED, u64 v UNNEEDED)
|
||||
{ fprintf(stderr, "towire_u64 called!\n"); abort(); }
|
||||
|
|
Loading…
Add table
Reference in a new issue