| 33 | }; |
| 34 | |
| 35 | static size_t ExpectedWitnessStackSize(ScriptType script_type) |
| 36 | { |
| 37 | switch (script_type) { |
| 38 | case ScriptType::P2WPKH: return 2; // [pubkey, signature] |
| 39 | case ScriptType::P2TR_KeyPath: return 1; // [signature] |
| 40 | case ScriptType::P2TR_ScriptPath: return 3; // [signature, tapscript, control block] |
| 41 | } // no default case, so the compiler can warn about missing cases |
| 42 | assert(false); |
| 43 | } |
| 44 | |
| 45 | // Microbenchmark for verification of standard scripts. |
| 46 | static void VerifyScriptBench(benchmark::Bench& bench, ScriptType script_type) |