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:
8 files changed
+224
-11
No files matched your search
@@ -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