Skip to content

Commit 72302b5

Browse files
committed
Update mocks
1 parent c8c2ae5 commit 72302b5

12 files changed

Lines changed: 14 additions & 55 deletions

‎common/test/run-blindedpath_onion.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED
7676
struct sciddir_or_pubkey *sciddpk UNNEEDED)
7777
{ fprintf(stderr, "fromwire_sciddir_or_pubkey called!\n"); abort(); }
7878
/* Generated stub for new_onionreply */
79-
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED)
79+
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED, const struct attribution_data *attr_data UNNEEDED)
8080
{ fprintf(stderr, "new_onionreply called!\n"); abort(); }
8181
/* Generated stub for pubkey_from_node_id */
8282
bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)

‎common/test/run-htable.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,6 @@ u8 fromwire_u8(const u8 **cursor UNNEEDED, size_t *max UNNEEDED)
8181
/* Generated stub for fromwire_u8_array */
8282
void fromwire_u8_array(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, u8 *arr UNNEEDED, size_t num UNNEEDED)
8383
{ fprintf(stderr, "fromwire_u8_array called!\n"); abort(); }
84-
/* Generated stub for memleak_add_helper_ */
85-
void memleak_add_helper_(const tal_t *p UNNEEDED, void (*cb)(struct htable *memtable UNNEEDED,
86-
const tal_t *)){ }
87-
/* Generated stub for memleak_scan_htable */
88-
void memleak_scan_htable(struct htable *memtable UNNEEDED, const struct htable *ht UNNEEDED)
89-
{ fprintf(stderr, "memleak_scan_htable called!\n"); abort(); }
90-
/* Generated stub for notleak_ */
91-
void *notleak_(void *ptr UNNEEDED, bool plus_children UNNEEDED)
92-
{ fprintf(stderr, "notleak_ called!\n"); abort(); }
9384
/* Generated stub for towire */
9485
void towire(u8 **pptr UNNEEDED, const void *data UNNEEDED, size_t len UNNEEDED)
9586
{ fprintf(stderr, "towire called!\n"); abort(); }

‎common/test/run-onion-message-test.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bool fromwire_channel_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
3131
void fromwire_node_id(const u8 **cursor UNNEEDED, size_t *max UNNEEDED, struct node_id *id UNNEEDED)
3232
{ fprintf(stderr, "fromwire_node_id called!\n"); abort(); }
3333
/* Generated stub for new_onionreply */
34-
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED)
34+
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED, const struct attribution_data *attr_data UNNEEDED)
3535
{ fprintf(stderr, "new_onionreply called!\n"); abort(); }
3636
/* Generated stub for pubkey_from_node_id */
3737
bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)

‎common/test/run-onion-test-vector.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
8686
bool mvt_tag_parse(const char *buf UNNEEDED, size_t len UNNEEDED, enum mvt_tag *tag UNNEEDED)
8787
{ fprintf(stderr, "mvt_tag_parse called!\n"); abort(); }
8888
/* Generated stub for new_onionreply */
89-
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED)
89+
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED, const struct attribution_data *attr_data UNNEEDED)
9090
{ fprintf(stderr, "new_onionreply called!\n"); abort(); }
9191
/* Generated stub for node_id_from_hexstr */
9292
bool node_id_from_hexstr(const char *str UNNEEDED, size_t slen UNNEEDED, struct node_id *id UNNEEDED)

‎common/test/run-route-infloop.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,6 @@ bool fromwire_tlv(const u8 **cursor UNNEEDED, size_t *max UNNEEDED,
3232
void *record UNNEEDED, struct tlv_field **fields UNNEEDED,
3333
const u64 *extra_types UNNEEDED, size_t *err_off UNNEEDED, u64 *err_type UNNEEDED)
3434
{ fprintf(stderr, "fromwire_tlv called!\n"); abort(); }
35-
/* Generated stub for memleak_add_helper_ */
36-
void memleak_add_helper_(const tal_t *p UNNEEDED, void (*cb)(struct htable *memtable UNNEEDED,
37-
const tal_t *)){ }
38-
/* Generated stub for memleak_scan_htable */
39-
void memleak_scan_htable(struct htable *memtable UNNEEDED, const struct htable *ht UNNEEDED)
40-
{ fprintf(stderr, "memleak_scan_htable called!\n"); abort(); }
41-
/* Generated stub for notleak_ */
42-
void *notleak_(void *ptr UNNEEDED, bool plus_children UNNEEDED)
43-
{ fprintf(stderr, "notleak_ called!\n"); abort(); }
4435
/* Generated stub for sciddir_or_pubkey_from_node_id */
4536
bool sciddir_or_pubkey_from_node_id(struct sciddir_or_pubkey *sciddpk UNNEEDED,
4637
const struct node_id *node_id UNNEEDED)

‎common/test/run-route_blinding_onion_test.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void fromwire_sciddir_or_pubkey(const u8 **cursor UNNEEDED, size_t *max UNNEEDED
3333
bool mvt_tag_parse(const char *buf UNNEEDED, size_t len UNNEEDED, enum mvt_tag *tag UNNEEDED)
3434
{ fprintf(stderr, "mvt_tag_parse called!\n"); abort(); }
3535
/* Generated stub for new_onionreply */
36-
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED)
36+
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED, const struct attribution_data *attr_data UNNEEDED)
3737
{ fprintf(stderr, "new_onionreply called!\n"); abort(); }
3838
/* Generated stub for node_id_from_hexstr */
3939
bool node_id_from_hexstr(const char *str UNNEEDED, size_t slen UNNEEDED, struct node_id *id UNNEEDED)

‎common/test/run-sphinx-xor_cipher_stream.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void hmac_update(crypto_auth_hmacsha256_state *state UNNEEDED,
9999
const void *src UNNEEDED, size_t slen UNNEEDED)
100100
{ fprintf(stderr, "hmac_update called!\n"); abort(); }
101101
/* Generated stub for new_onionreply */
102-
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED)
102+
struct onionreply *new_onionreply(const tal_t *ctx UNNEEDED, const u8 *contents TAKES UNNEEDED, const struct attribution_data *attr_data UNNEEDED)
103103
{ fprintf(stderr, "new_onionreply called!\n"); abort(); }
104104
/* Generated stub for pubkey_from_node_id */
105105
bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)

‎lightningd/test/run-invoice-select-inchan.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -257,16 +257,6 @@ struct channel *find_channel_by_id(const struct peer *peer UNNEEDED,
257257
struct plugin *find_plugin_for_command(struct lightningd *ld UNNEEDED,
258258
const char *cmd_name UNNEEDED)
259259
{ fprintf(stderr, "find_plugin_for_command called!\n"); abort(); }
260-
/* Generated stub for find_txwatch_ */
261-
struct txwatch *find_txwatch_(struct chain_topology *topo UNNEEDED,
262-
const struct bitcoin_txid *txid UNNEEDED,
263-
enum watch_result (*cb)(struct lightningd *ld UNNEEDED,
264-
const struct bitcoin_txid * UNNEEDED,
265-
const struct bitcoin_tx * UNNEEDED,
266-
unsigned int depth UNNEEDED,
267-
void *arg) UNNEEDED,
268-
void *arg UNNEEDED)
269-
{ fprintf(stderr, "find_txwatch_ called!\n"); abort(); }
270260
/* Generated stub for fixup_htlcs_out */
271261
void fixup_htlcs_out(struct lightningd *ld UNNEEDED)
272262
{ fprintf(stderr, "fixup_htlcs_out called!\n"); abort(); }

‎onchaind/test/run-grind_feerate-bug.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,9 @@ struct bitcoin_tx *htlc_success_tx(const tal_t *ctx UNNEEDED,
8888
/* Generated stub for master_badmsg */
8989
void master_badmsg(u32 type_expected UNNEEDED, const u8 *msg)
9090
{ fprintf(stderr, "master_badmsg called!\n"); abort(); }
91-
/* Generated stub for memleak_add_helper_ */
92-
void memleak_add_helper_(const tal_t *p UNNEEDED, void (*cb)(struct htable *memtable UNNEEDED,
93-
const tal_t *)){ }
9491
/* Generated stub for memleak_ptr */
9592
bool memleak_ptr(struct htable *memtable UNNEEDED, const void *p UNNEEDED)
9693
{ fprintf(stderr, "memleak_ptr called!\n"); abort(); }
97-
/* Generated stub for memleak_scan_htable */
98-
void memleak_scan_htable(struct htable *memtable UNNEEDED, const struct htable *ht UNNEEDED)
99-
{ fprintf(stderr, "memleak_scan_htable called!\n"); abort(); }
10094
/* Generated stub for memleak_scan_obj */
10195
void memleak_scan_obj(struct htable *memtable UNNEEDED, const void *obj UNNEEDED)
10296
{ fprintf(stderr, "memleak_scan_obj called!\n"); abort(); }

‎tests/fuzz/fuzz-wire-update_fail_htlc.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ struct update_fail_htlc {
99
struct channel_id channel_id;
1010
u64 id;
1111
u8 *reason;
12+
struct tlv_update_fail_htlc_tlvs *tlvs;
1213
};
1314

1415
static void *encode(const tal_t *ctx, const struct update_fail_htlc *s)
1516
{
16-
return towire_update_fail_htlc(ctx, &s->channel_id, s->id, s->reason);
17+
return towire_update_fail_htlc(ctx, &s->channel_id, s->id, s->reason, s->tlvs);
1718
}
1819

1920
static struct update_fail_htlc *decode(const tal_t *ctx, const void *p)
2021
{
2122
struct update_fail_htlc *s = tal(ctx, struct update_fail_htlc);
2223

23-
if (fromwire_update_fail_htlc(s, p, &s->channel_id, &s->id, &s->reason))
24+
if (fromwire_update_fail_htlc(s, p, &s->channel_id, &s->id, &s->reason, &s->tlvs))
2425
return s;
2526
return tal_free(s);
2627
}

0 commit comments

Comments
 (0)