| 7 | #include <plugins/bkpr/account.h> |
| 8 | |
| 9 | struct account *new_account(const tal_t *ctx, |
| 10 | const char *name, |
| 11 | struct node_id *peer_id) |
| 12 | { |
| 13 | struct account *a = tal(ctx, struct account); |
| 14 | |
| 15 | a->name = tal_strdup(a, name); |
| 16 | a->peer_id = peer_id; |
| 17 | a->is_wallet = streq(a->name, WALLET); |
| 18 | a->we_opened = false; |
| 19 | a->leased = false; |
| 20 | a->onchain_resolved_block = 0; |
| 21 | a->open_event_db_id = NULL; |
| 22 | a->closed_event_db_id = NULL; |
| 23 | a->closed_count = 0; |
| 24 | |
| 25 | return a; |
| 26 | } |
| 27 | |
| 28 | bool is_channel_account(const struct account *acct) |
| 29 | { |
no outgoing calls