mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-23 17:14:22 +01:00
df-rbf: only permit the channel initiator to init RBF
We're *mostly* set up for both sides doing RBF, except that it reverses the callback flow (using the plugin vs RPC calls) and we're not currently smart enough to flip between them gracefully
This commit is contained in:
@@ -1807,6 +1807,11 @@ json_openchannel_bump(struct command *cmd,
|
||||
" Current state %s, expected state %s",
|
||||
channel_state_name(channel),
|
||||
channel_state_str(DUALOPEND_AWAITING_LOCKIN));
|
||||
if (channel->opener != LOCAL)
|
||||
return command_fail(cmd, FUNDING_STATE_INVALID,
|
||||
"Only the channel opener can initiate an"
|
||||
" RBF attempt");
|
||||
|
||||
/* Ok, we're kosher to start */
|
||||
channel->open_attempt = oa = new_channel_open_attempt(channel);
|
||||
oa->funding = *amount;
|
||||
|
||||
Reference in New Issue
Block a user