mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-05 23:24:21 +01:00
lightningd: only allow closing to native segwit
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Removed: JSON-RPC: `close` `destination` no longer allows p2pkh or p2sh addresses (deprecated v0.11.0)
This commit is contained in:
@@ -48,9 +48,9 @@ static bool is_valid_witnessprog(const u8 *scriptpubkey)
|
||||
|
||||
bool valid_shutdown_scriptpubkey(const u8 *scriptpubkey,
|
||||
bool anysegwit,
|
||||
bool anchors)
|
||||
bool allow_oldstyle)
|
||||
{
|
||||
if (!anchors) {
|
||||
if (allow_oldstyle) {
|
||||
if (is_p2pkh(scriptpubkey, NULL)
|
||||
|| is_p2sh(scriptpubkey, NULL))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user