mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
plugins/multifundchannel.c: Implementation of multifundchannel
.
Changelog-Added: We now have `multifundchannel` as a builtin plugin command to fund multiple channels to different peers all in a single onchain transaction. Header from folded patch 'fixup-use-json_add_psbt.patch': fixup! Header from folded patch 'use-goto-no-ok-chain.patch': fixup! Header from folded patch 'destinations-at-parse-time.patch': fixup! Header from folded patch 'multifundchannel__use_jsmntoks_to_pass_through_json_string,_not_strings.patch': multifundchannel: use jsmntoks to pass through json string, not strings Passing in "" for utxos would crash lightningd on the command-line otherwise. Now returns an error. Header from folded patch 'update_plugins-multifundchannel.c.patch': Update plugins/multifundchannel.c Co-authored-by: Darosior <darosior@protonmail.com>
This commit is contained in:
parent
f7de4ac919
commit
0d3a3b6d48
5 changed files with 1952 additions and 0 deletions
1
.github/CODEOWNERS
vendored
1
.github/CODEOWNERS
vendored
|
@ -8,6 +8,7 @@ wallet/ @cdecker
|
|||
*.py @cdecker
|
||||
|
||||
wallet/invoices.* @ZmnSCPxj
|
||||
plugins/multifundchannel.c @ZmnSCPxj
|
||||
|
||||
common/param.* @wythe
|
||||
common/json.* @wythe
|
||||
|
|
|
@ -17,6 +17,16 @@ struct bitcoin_signature;
|
|||
struct bitcoin_txid;
|
||||
struct pubkey;
|
||||
|
||||
/** psbt_destroy - Destroy a PSBT that is not tal-allocated
|
||||
*
|
||||
* @psbt - the PSBT to destroy
|
||||
*
|
||||
* WARNING Do NOT call this function directly if you got the
|
||||
* PSBT from create_psbt, new_psbt, psbt_from_bytes,
|
||||
* psbt_from_b64, or fromwire_wally_psbt.
|
||||
* Those functions register this function as a `tal_destructor`
|
||||
* automatically.
|
||||
*/
|
||||
void psbt_destroy(struct wally_psbt *psbt);
|
||||
|
||||
/**
|
||||
|
|
1
plugins/.gitignore
vendored
1
plugins/.gitignore
vendored
|
@ -2,3 +2,4 @@ autoclean
|
|||
bcli
|
||||
fundchannel
|
||||
pay
|
||||
multifundchannel
|
||||
|
|
|
@ -24,6 +24,9 @@ PLUGIN_PAY_LIB_SRC := plugins/libplugin-pay.c
|
|||
PLUGIN_PAY_LIB_HEADER := plugins/libplugin-pay.h
|
||||
PLUGIN_PAY_LIB_OBJS := $(PLUGIN_PAY_LIB_SRC:.c=.o)
|
||||
|
||||
PLUGIN_MULTIFUNDCHANNEL_SRC := plugins/multifundchannel.c
|
||||
PLUGIN_MULTIFUNDCHANNEL_OBJS := $(PLUGIN_MULTIFUNDCHANNEL_SRC:.c=.o)
|
||||
|
||||
PLUGIN_ALL_SRC := \
|
||||
$(PLUGIN_AUTOCLEAN_SRC) \
|
||||
$(PLUGIN_BCLI_SRC) \
|
||||
|
@ -31,6 +34,7 @@ PLUGIN_ALL_SRC := \
|
|||
$(PLUGIN_KEYSEND_SRC) \
|
||||
$(PLUGIN_TXPREPARE_SRC) \
|
||||
$(PLUGIN_LIB_SRC) \
|
||||
$(PLUGIN_MULTIFUNDCHANNEL_SRC) \
|
||||
$(PLUGIN_PAY_LIB_SRC) \
|
||||
$(PLUGIN_PAY_SRC)
|
||||
PLUGIN_ALL_HEADER := \
|
||||
|
@ -44,6 +48,7 @@ PLUGINS := \
|
|||
plugins/fundchannel \
|
||||
plugins/keysend \
|
||||
plugins/pay \
|
||||
plugins/multifundchannel \
|
||||
plugins/txprepare
|
||||
|
||||
# Make sure these depend on everything.
|
||||
|
@ -105,4 +110,6 @@ plugins/bcli: bitcoin/chainparams.o $(PLUGIN_BCLI_OBJS) $(PLUGIN_LIB_OBJS) $(PLU
|
|||
plugins/keysend: bitcoin/chainparams.o wire/tlvstream.o wire/onion$(EXP)_wiregen.o $(PLUGIN_KEYSEND_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_PAY_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
||||
$(PLUGIN_KEYSEND_OBJS): $(PLUGIN_PAY_LIB_HEADER)
|
||||
|
||||
plugins/multifundchannel: bitcoin/chainparams.o common/addr.o $(PLUGIN_MULTIFUNDCHANNEL_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS)
|
||||
|
||||
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
|
||||
|
|
1933
plugins/multifundchannel.c
Normal file
1933
plugins/multifundchannel.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue