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

Function valid_shutdown_scriptpubkey

common/shutdown_scriptpubkey.c:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49bool valid_shutdown_scriptpubkey(const u8 *scriptpubkey,
50 bool anysegwit,
51 bool anchors)
52{
53 if (!anchors) {
54 if (is_p2pkh(scriptpubkey, NULL)
55 || is_p2sh(scriptpubkey, NULL))
56 return true;
57 }
58
59 return is_p2wpkh(scriptpubkey, NULL)
60 || is_p2wsh(scriptpubkey, NULL)
61 || (anysegwit && is_valid_witnessprog(scriptpubkey));
62}

Callers 4

json_closeFunction · 0.85
peer_got_shutdownFunction · 0.85

Calls 5

is_p2wshFunction · 0.85
is_valid_witnessprogFunction · 0.85
is_p2pkhFunction · 0.50
is_p2shFunction · 0.50
is_p2wpkhFunction · 0.50

Tested by

no test coverage detected