Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 1 addition & 43 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
LSP_REF: 'breez-node-v0.18.3-beta'
CLIENT_REF: 'v0.17.5-breez-3'
GO_VERSION: '^1.21.4'
CLN_VERSION: 'v25.02.1'
CLN_VERSION: 'v25.05'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -136,48 +136,6 @@ jobs:
CLN_VERSION: ${{ env.CLN_VERSION }}
timeout: 6m

run-lsps2-test:
runs-on: ubuntu-latest
needs:
- setup-itest
- setup-bitcoin-core
- setup-cln
- build-lspd
name: ${{ matrix.lsp }}-lsp ${{ matrix.client }}-client ${{ matrix.test }}
strategy:
max-parallel: 4
matrix:
test: [
testLsps0GetProtocolVersions,
testLsps2GetVersions,
testLsps2GetInfo,
testLsps2Buy,
testLsps2HappyFlow,
testLsps2NoBalance,
testLsps2ZeroConfUtxo
]
lsp: [
CLN
]
client: [
CLN
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run and Process Test State
uses: ./.github/actions/test-lspd
with:
TESTRE: "TestLspd/${{ matrix.lsp }}-lsp-${{ matrix.client}}-client:_${{ matrix.test }}"
artifact-name: TestLspd-${{ matrix.lsp }}-lsp-${{ matrix.client}}-client_${{ matrix.test }}
bitcoin-version: ${{ env.BITCOIN_VERSION }}
LSP_REF: ${{ env.LSP_REF }}
CLIENT_REF: ${{ env.CLIENT_REF }}
GO_VERSION: ${{ env.GO_VERSION }}
CLN_VERSION: ${{ env.CLN_VERSION }}
timeout: 6m

run-unit-tests:
runs-on: ubuntu-latest
name: Run unit tests
Expand Down
187 changes: 0 additions & 187 deletions cln/custom_msg_client.go

This file was deleted.

5 changes: 0 additions & 5 deletions cln_plugin/cln_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,3 @@ type LogNotification struct {
Level string `json:"level"`
Message string `json:"message"`
}

type CustomMessageRequest struct {
PeerId string `json:"peer_id"`
Payload string `json:"payload"`
}
53 changes: 1 addition & 52 deletions cln_plugin/cln_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const (
var (
DefaultSubscriberTimeout = "1m"
DefaultChannelAcceptorScript = ""
LspsFeatureBit = "0200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
)

const (
Expand Down Expand Up @@ -152,30 +151,6 @@ func (c *ClnPlugin) htlcListenServer() {
}
}

// Listens to responses to custommsg requests from the grpc server.
func (c *ClnPlugin) custommsgListenServer() {
for {
select {
case <-c.ctx.Done():
return
default:
id, result := c.server.ReceiveCustomMessageResponse()

// The server may return nil if it is stopped.
if result == nil {
continue
}

serid, _ := json.Marshal(&id)
c.sendToCln(&Response{
Id: serid,
JsonRpc: SpecVersion,
Result: result,
})
}
}
}

func (c *ClnPlugin) processRequest(request *Request) {
// Make sure the spec version is expected.
if request.JsonRpc != SpecVersion {
Expand Down Expand Up @@ -211,8 +186,6 @@ func (c *ClnPlugin) processRequest(request *Request) {
})
case "setchannelacceptscript":
c.handleSetChannelAcceptScript(request)
case "custommsg":
c.handleCustomMsg(request)
default:
c.sendError(
request.Id,
Expand Down Expand Up @@ -261,7 +234,6 @@ func (c *ClnPlugin) handleGetManifest(request *Request) {
},
Dynamic: false,
Hooks: []Hook{
{Name: "custommsg"},
{Name: "htlc_accepted"},
{Name: "openchannel"},
{Name: "openchannel2"},
Expand All @@ -270,9 +242,6 @@ func (c *ClnPlugin) handleGetManifest(request *Request) {
Subscriptions: []string{
"shutdown",
},
FeatureBits: &FeatureBits{
Node: &LspsFeatureBit,
},
},
})
}
Expand Down Expand Up @@ -405,9 +374,8 @@ func (c *ClnPlugin) handleInit(request *Request) {
return
}

// Listen for htlc and custommsg responses from the grpc server.
// Listen for htlc responses from the grpc server.
go c.htlcListenServer()
go c.custommsgListenServer()

// Let cln know the plugin is initialized.
c.sendToCln(&Response{
Expand Down Expand Up @@ -466,25 +434,6 @@ func (c *ClnPlugin) handleSetChannelAcceptScript(request *Request) {
})
}

func (c *ClnPlugin) handleCustomMsg(request *Request) {
var custommsg CustomMessageRequest
err := json.Unmarshal(request.Params, &custommsg)
if err != nil {
c.sendError(
request.Id,
ParseError,
fmt.Sprintf(
"Failed to unmarshal custommsg params:%s [%s]",
err.Error(),
request.Params,
),
)
return
}

c.server.SendCustomMessage(idToString(request.Id), &custommsg)
}

func unmarshalOpenChannel(request *Request) (r json.RawMessage, err error) {
switch request.Method {
case "openchannel":
Expand Down
7 changes: 0 additions & 7 deletions cln_plugin/proto/cln_plugin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ option go_package="github.com/breez/lspd/cln_plugin/proto";

service ClnPlugin {
rpc HtlcStream(stream HtlcResolution) returns (stream HtlcAccepted);
rpc CustomMsgStream(CustomMessageRequest) returns (stream CustomMessage);
}

message HtlcAccepted {
Expand Down Expand Up @@ -55,9 +54,3 @@ message HtlcFail {
message HtlcResolve {
string payment_key = 1;
}

message CustomMessageRequest {}
message CustomMessage {
string peer_id = 1;
string payload = 2;
}
Loading
Loading