BenchmarkIsPayToScriptHash benchmarks how long it takes IsPayToScriptHash to analyze a very large script.
(b *testing.B)
| 165 | // BenchmarkIsPayToScriptHash benchmarks how long it takes IsPayToScriptHash to |
| 166 | // analyze a very large script. |
| 167 | func BenchmarkIsPayToScriptHash(b *testing.B) { |
| 168 | script, err := genComplexScript() |
| 169 | if err != nil { |
| 170 | b.Fatalf("failed to create benchmark script: %v", err) |
| 171 | } |
| 172 | |
| 173 | b.ResetTimer() |
| 174 | b.ReportAllocs() |
| 175 | for i := 0; i < b.N; i++ { |
| 176 | _ = IsPayToScriptHash(script) |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | // BenchmarkIsMultisigScriptLarge benchmarks how long it takes IsMultisigScript |
| 181 | // to analyze a very large script. |
nothing calls this directly
no test coverage detected
searching dependent graphs…