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

Function towire_account

plugins/bkpr/account.c:69–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69static void towire_account(u8 **pptr, const struct account *account)
70{
71 towire_wirestring(pptr, account->name);
72 if (account->peer_id) {
73 towire_bool(pptr, true);
74 towire_node_id(pptr, account->peer_id);
75 } else
76 towire_bool(pptr, false);
77 towire_bool(pptr, account->we_opened);
78 towire_bool(pptr, account->leased);
79 towire_u64(pptr, account->onchain_resolved_block);
80 if (account->open_event_db_id) {
81 towire_bool(pptr, true);
82 towire_u64(pptr, *account->open_event_db_id);
83 } else
84 towire_bool(pptr, false);
85 if (account->closed_event_db_id) {
86 towire_bool(pptr, true);
87 towire_u64(pptr, *account->closed_event_db_id);
88 } else
89 towire_bool(pptr, false);
90 towire_u32(pptr, account->closed_count);
91}
92
93static struct account *fromwire_account(struct accounts *accounts,
94 const u8 **pptr, size_t *max)

Callers 1

account_datastore_setFunction · 0.85

Calls 5

towire_wirestringFunction · 0.50
towire_boolFunction · 0.50
towire_node_idFunction · 0.50
towire_u64Function · 0.50
towire_u32Function · 0.50

Tested by

no test coverage detected