Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom messages #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

sputn1ck
Copy link

@sputn1ck sputn1ck commented Jun 7, 2021

This PR adds the dev-sendcustommsg rpc and custommsg hook.

I also added a go.mod to the project which allows for easier dependancy management.

The dev-sendcustommsg RPC method allows the user to inject a custom message into the communication with the peer with the given node_id.
The custommsg plugin hook is the receiving counterpart to the dev-sendcustommsg RPC method and allows plugins to handle messages that are not handled internally.
}

func (r *CustomMessageRequest) Name() string {
return "dev-sendcustommsg"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This need to be changed to sendcustommsg, but I think there is no reason to specify it ElementsProject/lightning#4650 :)


go 1.16

require github.com/stretchr/testify v1.7.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From CD/CD I found the following error

# github.com/stretchr/testify/assert
../../stretchr/testify/assert/assertions.go:1738:5: undefined: errors.Is
../../stretchr/testify/assert/assertions.go:1761:6: undefined: errors.Is
../../stretchr/testify/assert/assertions.go:1784:5: undefined: errors.As
../../stretchr/testify/assert/assertions.go:1801:7: undefined: errors.Unwrap
../../stretchr/testify/assert/assertions.go:1805:7: undefined: errors.Unwrap
?   	github.com/niftynei/glightning/examples/plugin/pl_btc	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_dbwrites	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_example	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_featurebits	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_htlcacc	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_method	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_openchan	[no test files]
?   	github.com/niftynei/glightning/examples/plugin/pl_rpccmd	[no test files]
?   	github.com/niftynei/glightning/examples/rpc	[no test files]
?   	github.com/niftynei/glightning/gbitcoin	[no test files]
FAIL	github.com/niftynei/glightning/glightning [build failed]
FAIL	github.com/niftynei/glightning/glightning/tests [build failed]
FAIL	github.com/niftynei/glightning/jrpc2 [build failed]

Maybe we need to downgrade some packages or update the test?

Copy link

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 95d240a, only a few comments to be read with c-lightning 0.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants