From b60aaf8b239978947d2b0e3f56e7d8a4092d7570 Mon Sep 17 00:00:00 2001 From: Greg Sanders Date: Fri, 3 Nov 2023 09:21:48 -0400 Subject: [PATCH] policy: make anchor spend standard Only standard when non-nested. --- src/script/interpreter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 20a9830d0e..9d0e9b5e3c 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1943,6 +1943,8 @@ static bool VerifyWitnessProgram(const CScriptWitness& witness, int witversion, } return set_success(serror); } + } else if (!is_p2sh && CScript::IsPayToAnchor(witversion, program)) { + return true; } else { if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM) { return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM);