stdscript: Add v0 treasury gen p2sh benchmark.
BenchmarkIsTreasuryGenScriptHashScript -------------------------------------- v0_complex_non_standard 814816624 1.310 ns/op 0 allocs/op v0_treasury_generation_p2sh 520297904 2.274 ns/op 0 allocs/op This is part of a series of commits to fully implement the stdscript package.
This commit is contained in:
parent
b058f88437
commit
e31b426a2d
@ -291,3 +291,13 @@ func BenchmarkIsTreasuryGenPubKeyHashScript(b *testing.B) {
|
||||
}
|
||||
benchIsX(b, filterFn, IsTreasuryGenPubKeyHashScript)
|
||||
}
|
||||
|
||||
// BenchmarkIsTreasuryGenScriptHashScript benchmarks the performance of
|
||||
// analyzing various public key scripts to determine if they are treasury
|
||||
// generation p2sh scripts.
|
||||
func BenchmarkIsTreasuryGenScriptHashScript(b *testing.B) {
|
||||
filterFn := func(test scriptTest) bool {
|
||||
return test.wantType == STTreasuryGenScriptHash
|
||||
}
|
||||
benchIsX(b, filterFn, IsTreasuryGenScriptHashScript)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user