bkpr: new method, "is_external_account"

Utility method to figure out if an account is "external"
This commit is contained in:
niftynei 2022-07-19 17:04:40 +09:30 committed by Rusty Russell
parent 97204d6e0a
commit 9346158290
2 changed files with 7 additions and 0 deletions

View File

@ -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");
}

View File

@ -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 */