stdscript: Add v0 stake revoke p2sh benchmark.

BenchmarkIsStakeRevocationScriptHashScript
------------------------------------------
v0_complex_non_standard   725635868   1.631 ns/op   0 allocs/op
v0_stake_revoke_p2sh      522431919   2.571 ns/op   0 allocs/op

This is part of a series of commits to fully implement the stdscript
package.
This commit is contained in:
Dave Collins 2021-05-30 02:55:48 -05:00
parent 6710289098
commit ff69455469
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2

View File

@ -242,3 +242,13 @@ func BenchmarkIsStakeRevocationPubKeyHashScript(b *testing.B) {
}
benchIsX(b, filterFn, IsStakeRevocationPubKeyHashScript)
}
// BenchmarkIsStakeRevocationScriptHashScript benchmarks the performance of
// various public key scripts to determine if they are stake revocation p2sh
// scripts.
func BenchmarkIsStakeRevocationScriptHashScript(b *testing.B) {
filterFn := func(test scriptTest) bool {
return test.wantType == STStakeRevocationScriptHash
}
benchIsX(b, filterFn, IsStakeRevocationScriptHashScript)
}