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

Function new_height_states

common/blockheight_states.c:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <wire/wire.h>
8
9struct height_states *new_height_states(const tal_t *ctx,
10 enum side opener,
11 const u32 *blockheight)
12{
13 struct height_states *states = tal(ctx, struct height_states);
14
15 /* Set to NULL except terminal value */
16 for (size_t i = 0; i < ARRAY_SIZE(states->height); i++)
17 states->height[i] = NULL;
18
19 if (blockheight)
20 /* We reuse fee states! */
21 states->height[last_fee_state(opener)]
22 = tal_dup(states, u32, blockheight);
23 return states;
24}
25
26u32 get_blockheight(const struct height_states *height_states,
27 enum side opener,

Callers 15

test_channel_crudFunction · 0.85
mainFunction · 0.85
wallet_update_channelFunction · 0.85
wallet_commit_channelFunction · 0.85
wallet_commit_channelFunction · 0.85
stub_chanFunction · 0.85
init_channelsFunction · 0.85
runFunction · 0.85
revert_channel_stateFunction · 0.85

Calls 1

last_fee_stateFunction · 0.85

Tested by 3

test_channel_crudFunction · 0.68
mainFunction · 0.68