mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
fix: do not send send peerstorage msg when disabled
This commit will disable the peerstorage plugins when the feature is not enabled. I found this issue with lnprototest, and I guess we did not find it with normal run because other the unknown messages are ingored? Changelog-Fixed: Disable the protocol messages when peerstorage is disabled. Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
committed by
Alex Myers
parent
355a7ae827
commit
bcc94b2d43
@@ -346,6 +346,9 @@ static struct command_result *peer_after_listdatastore(struct command *cmd,
|
||||
return command_hook_success(cmd);
|
||||
struct out_req *req;
|
||||
|
||||
if (!peer_backup)
|
||||
return command_hook_success(cmd);
|
||||
|
||||
u8 *payload = towire_your_peer_storage(cmd, hexdata);
|
||||
|
||||
plugin_log(cmd->plugin, LOG_DBG,
|
||||
@@ -443,7 +446,7 @@ static struct command_result *after_listpeers(struct command *cmd,
|
||||
json_to_bool(buf, json_get_member(buf, peer, "connected"),
|
||||
&is_connected);
|
||||
|
||||
if (is_connected) {
|
||||
if (is_connected && peer_backup) {
|
||||
const jsmntok_t *nodeid;
|
||||
struct node_id node_id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user