Skip to content

ChannelManager::accept_inbound_channel doesn't reject channel on error #3090

Open
@mhrheaume

Description

@mhrheaume

Recently when running a testnet node with manually_accept_inbound_channels, I encountered the following error when calling accept_inbound_channel_from_trusted_peer_0conf:

Funding amount (287084 sats) can't even pay fee for initial commitment transaction fee of 415006 sats.

This is a reasonable error to return in this scenario, but I was surprised to learn that we don't actually send an error to the peer in this case, which leaves the peer hanging until one of the nodes times out. Other errors in accept_inbound_channel_from_trusted_peer_0conf will send an error to the peer and reject the channel.

IMO we should either:

  1. Reject the channel any time there is an error in accept_inbound_channel.
  2. In the Err returned by accept_inbound_channel, return some indication for whether or not the channel was rejected, so that the caller can determine whether they want to reject the channel or retry accepting with different parameters.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions