mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
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.
This commit is contained in:
committed by
neil saitug
parent
8c23f22591
commit
9f298330b2
@@ -119,12 +119,12 @@ The `dynamic` indicates if the plugin can be managed after `lightningd`
|
|||||||
has been started. Critical plugins that should not be stopped should set it
|
has been started. Critical plugins that should not be stopped should set it
|
||||||
to false.
|
to false.
|
||||||
|
|
||||||
The `features` object allows the plugin to register featurebits that should be
|
The `featurebits` object allows the plugin to register featurebits that should be
|
||||||
announced in a number of places in [the protocol][bolt9]. They can be used to signal
|
announced in a number of places in [the protocol][bolt9]. They can be used to signal
|
||||||
support for custom protocol extensions to direct peers, remote nodes and in
|
support for custom protocol extensions to direct peers, remote nodes and in
|
||||||
invoices. Custom protocol extensions can be implemented for example using the
|
invoices. Custom protocol extensions can be implemented for example using the
|
||||||
`sendcustommsg` method and the `custommsg` hook, or the `sendonion` method and
|
`sendcustommsg` method and the `custommsg` hook, or the `sendonion` method and
|
||||||
the `htlc_accepted` hook. The keys in the `features` object are `node` for
|
the `htlc_accepted` hook. The keys in the `featurebits` object are `node` for
|
||||||
features that should be announced via the `node_announcement` to all nodes in
|
features that should be announced via the `node_announcement` to all nodes in
|
||||||
the network, `init` for features that should be announced to direct peers
|
the network, `init` for features that should be announced to direct peers
|
||||||
during the connection setup, `channel` for features which should apply to `channel_announcement`, and `invoice` for features that should be
|
during the connection setup, `channel` for features which should apply to `channel_announcement`, and `invoice` for features that should be
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ handle_getmanifest(struct command *getmanifest_cmd)
|
|||||||
json_array_end(params);
|
json_array_end(params);
|
||||||
|
|
||||||
if (p->our_features != NULL) {
|
if (p->our_features != NULL) {
|
||||||
json_object_start(params, "features");
|
json_object_start(params, "featurebits");
|
||||||
for (size_t i = 0; i < NUM_FEATURE_PLACE; i++) {
|
for (size_t i = 0; i < NUM_FEATURE_PLACE; i++) {
|
||||||
u8 *f = p->our_features->bits[i];
|
u8 *f = p->our_features->bits[i];
|
||||||
const char *fieldname = feature_place_names[i];
|
const char *fieldname = feature_place_names[i];
|
||||||
|
|||||||
@@ -2961,7 +2961,6 @@ def test_excluded_adjacent_routehint(node_factory, bitcoind):
|
|||||||
l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0)
|
l1.rpc.pay(bolt11=inv['bolt11'], maxfeepercent=0, exemptfee=0)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(strict=True)
|
|
||||||
def test_keysend(node_factory):
|
def test_keysend(node_factory):
|
||||||
# Use a temporary python plugin until we implement a native one
|
# Use a temporary python plugin until we implement a native one
|
||||||
plugin_path = os.path.join(os.getcwd(), 'tests/plugins/keysend.py')
|
plugin_path = os.path.join(os.getcwd(), 'tests/plugins/keysend.py')
|
||||||
|
|||||||
Reference in New Issue
Block a user