mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
multi: add zeroconfacceptor that default rejects if no rpc acceptors
This is a safety mechanism so that zero-conf channels are not accepted by default if no rpc acceptor exists.
This commit is contained in:
@@ -118,3 +118,16 @@ func (c *ChannelAcceptResponse) RejectChannel() bool {
|
||||
type ChannelAcceptor interface {
|
||||
Accept(req *ChannelAcceptRequest) *ChannelAcceptResponse
|
||||
}
|
||||
|
||||
// MultiplexAcceptor is an interface that abstracts the ability of a
|
||||
// ChannelAcceptor to contain sub-ChannelAcceptors.
|
||||
type MultiplexAcceptor interface {
|
||||
// Embed the ChannelAcceptor.
|
||||
ChannelAcceptor
|
||||
|
||||
// AddAcceptor nests a ChannelAcceptor inside the MultiplexAcceptor.
|
||||
AddAcceptor(acceptor ChannelAcceptor) uint64
|
||||
|
||||
// Remove a sub-ChannelAcceptor.
|
||||
RemoveAcceptor(id uint64)
|
||||
}
|
||||
|
Reference in New Issue
Block a user