stdscript: Add v0 stake change p2sh benchmark.
BenchmarkIsStakeChangeScriptHash -------------------------------- v0_complex_non_standard 688796947 1.626 ns/op 0 allocs/op v0_stake_change_p2sh 503956689 2.282 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
3e10162c52
commit
96a2bc60f6
@ -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)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user