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

Function sig_notation

devtools/mkgossip.c:76–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static char *sig_notation(const struct privkey *privkey,
77 struct sha256_double *hash,
78 const secp256k1_ecdsa_signature *sig)
79{
80 const char *pstr = tal_hexstr(NULL, privkey->secret.data,
81 sizeof(privkey->secret.data));
82 const char *hstr = fmt_sha256_double(NULL, hash);
83
84 if (verbose)
85 return tal_fmt(NULL,
86 "SIG(%s:%s)\n"
87 " -- privkey= %s\n"
88 " -- tx_hash= %s\n"
89 " -- computed_sig= %s",
90 pstr, hstr, pstr, hstr, sig_as_hex(sig));
91
92 return tal_fmt(NULL, "SIG(%s:%s)", pstr, hstr);
93}
94
95/* BOLT #7:
96 *

Callers 3

print_updateFunction · 0.70
print_nannounceFunction · 0.70
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