Skip to content

Commit 124a155

Browse files
committed
lsp_plugin: remove feature flag temporarily to ...
please `connect` tests. We need to fix this in the future. Connectd should not tell peers about features of disabled plugins. We need to ensure that connectd only starts once the plugins have returned from init. Signed-off-by: Peter Neuroth <[email protected]>
1 parent 1d6b2c3 commit 124a155

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

plugins/lsps-plugin/src/service.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use cln_lsps::lsps2::cln::{HtlcAcceptedRequest, HtlcAcceptedResponse};
1010
use cln_lsps::lsps2::handler::{ClnApiRpc, HtlcAcceptedHookHandler};
1111
use cln_lsps::lsps2::model::{Lsps2BuyRequest, Lsps2GetInfoRequest};
1212
use cln_lsps::util::wrap_payload_with_peer_id;
13-
use cln_lsps::{lsps0, lsps2, util, LSP_FEATURE_BIT};
13+
use cln_lsps::{lsps0, lsps2};
1414
use cln_plugin::Plugin;
1515
use cln_rpc::notifications::CustomMsgNotification;
1616
use cln_rpc::primitives::PublicKey;
@@ -30,14 +30,18 @@ async fn main() -> Result<(), anyhow::Error> {
3030
if let Some(plugin) = cln_plugin::Builder::new(tokio::io::stdin(), tokio::io::stdout())
3131
.option(lsps2::OPTION_ENABLED)
3232
.option(lsps2::OPTION_PROMISE_SECRET)
33-
.featurebits(
34-
cln_plugin::FeatureBitsKind::Node,
35-
util::feature_bit_to_hex(LSP_FEATURE_BIT),
36-
)
37-
.featurebits(
38-
cln_plugin::FeatureBitsKind::Init,
39-
util::feature_bit_to_hex(LSP_FEATURE_BIT),
40-
)
33+
// FIXME: Temporarily disabled lsp feature to please test cases, this is
34+
// ok as the feature is optional per spec.
35+
// We need to ensure that `connectd` only starts after all plugins have
36+
// been initialized.
37+
// .featurebits(
38+
// cln_plugin::FeatureBitsKind::Node,
39+
// util::feature_bit_to_hex(LSP_FEATURE_BIT),
40+
// )
41+
// .featurebits(
42+
// cln_plugin::FeatureBitsKind::Init,
43+
// util::feature_bit_to_hex(LSP_FEATURE_BIT),
44+
// )
4145
.hook("custommsg", on_custommsg)
4246
.hook("htlc_accepted", on_htlc_accepted)
4347
.configure()

0 commit comments

Comments
 (0)