mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-12 21:01:21 +00:00
PrivValidator interface
This commit is contained in:
@ -30,15 +30,15 @@ func BenchmarkProposalWriteSignBytes(b *testing.B) {
|
||||
func BenchmarkProposalSign(b *testing.B) {
|
||||
privVal := GenPrivValidator()
|
||||
for i := 0; i < b.N; i++ {
|
||||
privVal.Sign(SignBytes("test_chain_id", testProposal))
|
||||
privVal.Signer.Sign(SignBytes("test_chain_id", testProposal))
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkProposalVerifySignature(b *testing.B) {
|
||||
signBytes := SignBytes("test_chain_id", testProposal)
|
||||
privVal := GenPrivValidator()
|
||||
signature, _ := privVal.Sign(signBytes)
|
||||
pubKey := privVal.PubKey
|
||||
signature, _ := privVal.Signer.Sign(signBytes)
|
||||
pubKey := privVal.PubKey()
|
||||
|
||||
for i := 0; i < b.N; i++ {
|
||||
pubKey.VerifyBytes(SignBytes("test_chain_id", testProposal), signature)
|
||||
|
Reference in New Issue
Block a user