From 9346158290d715d3471b510bc1c99b325b0d4ecc Mon Sep 17 00:00:00 2001 From: niftynei Date: Tue, 19 Jul 2022 17:04:40 +0930 Subject: [PATCH] bkpr: new method, "is_external_account" Utility method to figure out if an account is "external" --- plugins/bkpr/account.c | 5 +++++ plugins/bkpr/account.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/plugins/bkpr/account.c b/plugins/bkpr/account.c index f36fcb330..ba47a8504 100644 --- a/plugins/bkpr/account.c +++ b/plugins/bkpr/account.c @@ -30,3 +30,8 @@ bool is_channel_account(const struct account *acct) return !streq(acct->name, WALLET) && !streq(acct->name, "external"); } + +bool is_external_account(const struct account *acct) +{ + return streq(acct->name, "external"); +} diff --git a/plugins/bkpr/account.h b/plugins/bkpr/account.h index afce6e5f1..7cbc79a3a 100644 --- a/plugins/bkpr/account.h +++ b/plugins/bkpr/account.h @@ -46,4 +46,6 @@ struct account *new_account(const tal_t *ctx, /* Is this a channel account? */ bool is_channel_account(const struct account *acct); +/* is this the 'external' account */ +bool is_external_account(const struct account *acct); #endif /* LIGHTNING_PLUGINS_BKPR_ACCOUNT_H */