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

Function new_account

plugins/bkpr/account.c:49–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49static struct account *new_account(struct accounts *accounts,
50 const char *name TAKES)
51{
52 struct account *a = tal(accounts, struct account);
53
54 a->name = tal_strdup(a, name);
55 a->peer_id = NULL;
56 a->is_wallet = is_wallet_account(a->name);
57 a->we_opened = false;
58 a->leased = false;
59 a->onchain_resolved_block = 0;
60 a->open_event_db_id = NULL;
61 a->closed_event_db_id = NULL;
62 a->closed_count = 0;
63
64 account_htable_add(accounts->htable, a);
65 tal_add_destructor2(a, destroy_account, accounts);
66 return a;
67}
68
69static void towire_account(u8 **pptr, const struct account *account)
70{

Callers 10

fromwire_accountFunction · 0.85
find_or_create_accountFunction · 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 1

is_wallet_accountFunction · 0.85

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