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

Function per_commit_secret

common/derive_basepoints.c:92–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92bool per_commit_secret(const struct sha256 *shaseed,
93 struct secret *commit_secret,
94 u64 per_commit_index)
95{
96 struct sha256 s;
97
98 if (per_commit_index >= (1ULL << SHACHAIN_BITS))
99 return false;
100
101 shachain_from_seed(shaseed, shachain_index(per_commit_index), &s);
102
103 CROSS_TYPE_ASSIGNMENT(commit_secret, &s);
104 return true;
105}
106
107bool per_commit_point(const struct sha256 *shaseed,
108 struct pubkey *commit_point,

Callers 7

dump_commitments_infosFunction · 0.85
pretend_got_revokeFunction · 0.85
per_commit_pointFunction · 0.85
print_basepointsFunction · 0.85

Calls 2

shachain_from_seedFunction · 0.85
shachain_indexFunction · 0.85

Tested by

no test coverage detected