mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 16:44:20 +01:00
txprepare: Use param_outpoint_arr helper to validate input
This commit is contained in:
committed by
Rusty Russell
parent
32000b6660
commit
55d9492d9e
@@ -193,6 +193,14 @@ void json_add_txid(struct json_stream *result, const char *fieldname,
|
||||
json_add_string(result, fieldname, hex);
|
||||
}
|
||||
|
||||
void json_add_outpoint(struct json_stream *result, const char *fieldname,
|
||||
const struct bitcoin_outpoint *out)
|
||||
{
|
||||
char hex[hex_str_size(sizeof(out->txid))];
|
||||
bitcoin_txid_to_hex(&out->txid, hex, sizeof(hex));
|
||||
json_add_member(result, fieldname, true, "%s:%d", hex, out->n);
|
||||
}
|
||||
|
||||
void json_add_short_channel_id(struct json_stream *response,
|
||||
const char *fieldname,
|
||||
const struct short_channel_id *scid)
|
||||
|
||||
Reference in New Issue
Block a user