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

Function fromwire_dstore_channel

plugins/askrene/datastore_wire.c:110–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110bool fromwire_dstore_channel(const u8 **cursor, size_t *len,
111 struct node_id *n1,
112 struct node_id *n2,
113 struct short_channel_id *scid,
114 struct amount_msat *capacity)
115{
116 if (fromwire_u16(cursor, len) != DSTORE_CHANNEL) {
117 fromwire_fail(cursor, len);
118 return false;
119 }
120 fromwire_node_id(cursor, len, n1);
121 fromwire_node_id(cursor, len, n2);
122 *scid = fromwire_short_channel_id(cursor, len);
123 *capacity = fromwire_amount_msat(cursor, len);
124
125 return *cursor != NULL;
126}
127
128void towire_dstore_channel(u8 **data,
129 const struct node_id *n1,

Callers 2

convert_layer_dataFunction · 0.85
load_channelFunction · 0.85

Calls 5

fromwire_u16Function · 0.50
fromwire_failFunction · 0.50
fromwire_node_idFunction · 0.50
fromwire_amount_msatFunction · 0.50

Tested by

no test coverage detected