dev-forget-channel: accept passing in channel_id

This patch adds a channel_id parameter to allow for specifying
channels that are lacking a short_channel_id.

Useful in the case where a peer has 1) multiple channels (ONCHAIN etc)
and 2) a channel where the funding transaction hasn't been
broadcast/mined.
This commit is contained in:
lisa neigut
2019-09-30 11:31:27 -05:00
committed by Rusty Russell
parent cbfa045f91
commit af4ffe5fcd
8 changed files with 62 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
#include "config.h"
#include <bitcoin/tx.h>
#include <common/json.h>
#include <wire/wire.h>
struct amount_msat;
struct amount_sat;
@@ -44,6 +45,10 @@ bool json_to_msat(const char *buffer, const jsmntok_t *tok,
bool json_to_txid(const char *buffer, const jsmntok_t *tok,
struct bitcoin_txid *txid);
/* Extract a channel id from this */
bool json_to_channel_id(const char *buffer, const jsmntok_t *tok,
struct channel_id *cid);
/* Split a json token into 2 tokens given a splitting character */
bool split_tok(const char *buffer, const jsmntok_t *tok,
char split,