MCPcopy Create free account
hub / github.com/ElementsProject/lightning / new_account

Function new_account

plugins/bkpr/account.c:9–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <plugins/bkpr/account.h>
8
9struct 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
28bool is_channel_account(const struct account *acct)
29{

Callers 10

json_balance_snapshotFunction · 0.85
parse_and_log_chain_moveFunction · 0.85
test_channel_rebalancesFunction · 0.85
test_channel_event_crudFunction · 0.85
test_chain_event_crudFunction · 0.85
test_account_balancesFunction · 0.85
test_account_crudFunction · 0.85

Calls

no outgoing calls

Tested by 8

test_channel_rebalancesFunction · 0.68
test_channel_event_crudFunction · 0.68
test_chain_event_crudFunction · 0.68
test_account_balancesFunction · 0.68
test_account_crudFunction · 0.68