Add default channel acceptor

- Implemented a default channel acceptor script for the channel acceptor in 'channel_acceptor.go'. If no accept script is provided, the default script is set to "continue".
- Updated 'cln_plugin.go' to include a new DefaultChannelAcceptorScript variable with an empty string default value.
- Updated the handleGetManifest function to include DefaultChannelAcceptorScript as a default for the 'channelAcceptScript' field.
This commit is contained in:
lndev
2023-07-12 09:06:51 +00:00
committed by Jesse de Wit
parent 70d6afcf85
commit c7eeaf1cbe
2 changed files with 10 additions and 1 deletions

View File

@@ -23,7 +23,8 @@ const (
)
var (
DefaultSubscriberTimeout = "1m"
DefaultSubscriberTimeout = "1m"
DefaultChannelAcceptorScript = ""
)
const (
@@ -259,6 +260,7 @@ func (c *ClnPlugin) handleGetManifest(request *Request) {
Name: channelAcceptScript,
Type: "string",
Description: "starlark script for channel acceptor.",
Default: &DefaultChannelAcceptorScript,
},
},
RpcMethods: []*RpcMethod{