libplugin: add data pointer for plugin convenience.

This avoids globals (and means memleak traverses the variables!): we
only change over the test plugin though, to avoid unnecessary churn.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2024-08-07 11:19:52 +09:30
parent e11bab8bbb
commit 11bfbf5deb
18 changed files with 77 additions and 30 deletions

View File

@@ -594,7 +594,7 @@ int main(int argc, char *argv[])
features->bits[i] = tal_arr(features, u8, 0);
set_feature_bit(&features->bits[NODE_ANNOUNCE_FEATURE], KEYSEND_FEATUREBIT);
plugin_main(argv, init, PLUGIN_STATIC, true, features, commands,
plugin_main(argv, init, NULL, PLUGIN_STATIC, true, features, commands,
ARRAY_SIZE(commands), NULL, 0, hooks, ARRAY_SIZE(hooks),
notification_topics, ARRAY_SIZE(notification_topics), NULL);
}