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

Function sig_notation

devtools/mkcommit.c:227–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225
226
227static char *sig_notation(const struct sha256_double *hash,
228 const struct privkey *privkey,
229 const struct bitcoin_signature *sig)
230{
231 const char *pstr = tal_hexstr(NULL, privkey->secret.data, sizeof(privkey->secret.data));
232 const char *hstr = fmt_sha256_double(NULL, hash);
233
234 if (verbose)
235 return tal_fmt(NULL,
236 "SIG(%s:%s)\n privkey: %s\n tx_hash: %s\n"
237 " sig: %s",
238 pstr, hstr, pstr, hstr, sig_as_hex(sig));
239
240 return tal_fmt(NULL, "SIG(%s:%s)", pstr, hstr);
241}
242
243int main(int argc, char *argv[])
244{

Callers 1

mainFunction · 0.70

Calls 3

tal_hexstrFunction · 0.85
fmt_sha256_doubleFunction · 0.85
sig_as_hexFunction · 0.70

Tested by

no test coverage detected