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

Function compact_size_len

wallet/psbt_fixup.c:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19};
20
21static size_t compact_size_len(u64 v)
22{
23 if (v < 0xfd) {
24 return 1;
25 } else if (v <= 0xffff) {
26 return 3;
27 } else if (v <= 0xffffffff) {
28 return 5;
29 } else {
30 return 9;
31 }
32}
33
34static u64 fromwire_compact_size(const u8 **cursor, size_t *max)
35{

Callers 2

fromwire_keypairFunction · 0.85
towire_keypairFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected