Skip to content

Commit 9f29833

Browse files
cdeckerniftynei
authored andcommitted
libplugin: It's featurebits, not features
The documentation was wrong, and I copied my mistake to `libplugin` where it was then ignored instead of ORed into the node's featurebits. This fixes both.
1 parent 8c23f22 commit 9f29833

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

doc/PLUGINS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ The `dynamic` indicates if the plugin can be managed after `lightningd`
119119
has been started. Critical plugins that should not be stopped should set it
120120
to false.
121121

122-
The `features` object allows the plugin to register featurebits that should be
122+
The `featurebits` object allows the plugin to register featurebits that should be
123123
announced in a number of places in [the protocol][bolt9]. They can be used to signal
124124
support for custom protocol extensions to direct peers, remote nodes and in
125125
invoices. Custom protocol extensions can be implemented for example using the
126126
`sendcustommsg` method and the `custommsg` hook, or the `sendonion` method and
127-
the `htlc_accepted` hook. The keys in the `features` object are `node` for
127+
the `htlc_accepted` hook. The keys in the `featurebits` object are `node` for
128128
features that should be announced via the `node_announcement` to all nodes in
129129
the network, `init` for features that should be announced to direct peers
130130
during the connection setup, `channel` for features which should apply to `channel_announcement`, and `invoice` for features that should be

plugins/libplugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ handle_getmanifest(struct command *getmanifest_cmd)
604604
json_array_end(params);
605605

606606
if (p->our_features != NULL) {
607-
json_object_start(params, "features");
607+
json_object_start(params, "featurebits");
608608
for (size_t i = 0; i < NUM_FEATURE_PLACE; i++) {
609609
u8 *f = p->our_features->bits[i];
610610
const char *fieldname = feature_place_names[i];

tests/test_pay.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,6 @@ def test_excluded_adjacent_routehint(node_factory, bitcoind):
29612961
l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0)
29622962

29632963

2964-
@pytest.mark.xfail(strict=True)
29652964
def test_keysend(node_factory):
29662965
# Use a temporary python plugin until we implement a native one
29672966
plugin_path = os.path.join(os.getcwd(), 'tests/plugins/keysend.py')

0 commit comments

Comments
 (0)