mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
common: tal_dup_talarr() helper.
This is a common thing to do, so create a macro. Unfortunately, it still needs the type arg, because the paramter may be const, and the return cannot be, and C doesn't have a general "(-const)" cast. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -82,7 +82,7 @@ void txfilter_add_scriptpubkey(struct txfilter *filter, const u8 *script TAKES)
|
||||
{
|
||||
scriptpubkeyset_add(
|
||||
&filter->scriptpubkeyset,
|
||||
notleak(tal_dup_arr(filter, u8, script, tal_count(script), 0)));
|
||||
notleak(tal_dup_talarr(filter, u8, script)));
|
||||
}
|
||||
|
||||
void txfilter_add_derkey(struct txfilter *filter,
|
||||
|
||||
Reference in New Issue
Block a user