diff --git a/internal/staging/stdscript/script_bench_test.go b/internal/staging/stdscript/script_bench_test.go index f65e444f..fb259c66 100644 --- a/internal/staging/stdscript/script_bench_test.go +++ b/internal/staging/stdscript/script_bench_test.go @@ -262,3 +262,13 @@ func BenchmarkIsStakeChangePubKeyHash(b *testing.B) { } benchIsX(b, filterFn, IsStakeChangePubKeyHashScript) } + +// BenchmarkIsStakeChangeScriptHash benchmarks the performance of analyzing +// various public key scripts to determine if they are stake change p2sh +// scripts. +func BenchmarkIsStakeChangeScriptHash(b *testing.B) { + filterFn := func(test scriptTest) bool { + return test.wantType == STStakeChangeScriptHash + } + benchIsX(b, filterFn, IsStakeChangeScriptHashScript) +}