multi: add channel open parameters to channel acceptor

Add more fields to channel acceptor response so that users can have more
fine grained control over their incoming channels. With our chained
acceptor, it is possible that we get inconsistent responses from
multiple chained acceptors. We create a conjugate repsponse from all the
set fields in our various responses, but fail if we get different, non-
zero responses from our various acceptors. Separate merge functions are
used per type so that we avoid unexpected outcomes comparing interfaces
(panic on comparing types that aren't comparable), with casting used
where applicable to avoid code duplication.
This commit is contained in:
carla committed 2020-11-10 21:09:10 +02:00
1 parent 0d35ce7561
commit 5679dde1bc
11 files changed
+1568 -810

No files matched your search

+849 -765
View File
File diff suppressed because it is too large. Load diff
+42
View File
@@ -801,6 +801,48 @@ message ChannelAcceptResponse {
characters.
*/
string error = 3;
/*
The upfront shutdown address to use if the initiating peer supports option
upfront shutdown script (see ListPeers for the features supported). Note
that the channel open will fail if this value is set for a peer that does
not support this feature bit.
*/
string upfront_shutdown = 4;
/*
The csv delay (in blocks) that we require for the remote party.
*/
uint32 csv_delay = 5;
/*
The reserve amount in satoshis that we require the remote peer to adhere to.
We require that the remote peer always have some reserve amount allocated to
them so that there is always a disincentive to broadcast old state (if they
hold 0 sats on their side of the channel, there is nothing to lose).
*/
uint64 reserve_sat = 6;
/*
The maximum amount of funds in millisatoshis that we allow the remote peer
to have in outstanding htlcs.
*/
uint64 in_flight_max_msat = 7;
/*
The maximum number of htlcs that the remote peer can offer us.
*/
uint32 max_htlc_count = 8;
/*
The minimum value in millisatoshis for incoming htlcs on the channel.
*/
uint64 min_htlc_in = 9;
/*
The number of confirmations we require before we consider the channel open.
*/
uint32 min_accept_depth = 10;
}
message ChannelPoint {