mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
consensus/types: fix BenchmarkRoundStateDeepCopy panics (#4244)
Fixes #4243
This commit is contained in:
@@ -132,3 +132,4 @@ program](https://hackerone.com/tendermint).
|
||||
- [types] \#4164 Prevent temporary power overflows on validator updates (joint
|
||||
efforts of @gchaincl and @ancazamfir)
|
||||
- [p2p] \#4140 `SecretConnection`: use the transcript solely for authentication (i.e. MAC)
|
||||
- [consensus/types] \#4243 fix BenchmarkRoundStateDeepCopy panics (@cuonglm)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
amino "github.com/tendermint/go-amino"
|
||||
"github.com/tendermint/tendermint/crypto/ed25519"
|
||||
"github.com/tendermint/tendermint/crypto/tmhash"
|
||||
"github.com/tendermint/tendermint/libs/rand"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
tmtime "github.com/tendermint/tendermint/types/time"
|
||||
@@ -18,9 +19,10 @@ func BenchmarkRoundStateDeepCopy(b *testing.B) {
|
||||
vset, _ := types.RandValidatorSet(nval, 1)
|
||||
commitSigs := make([]types.CommitSig, nval)
|
||||
blockID := types.BlockID{
|
||||
Hash: rand.RandBytes(20),
|
||||
Hash: rand.RandBytes(tmhash.Size),
|
||||
PartsHeader: types.PartSetHeader{
|
||||
Hash: rand.RandBytes(20),
|
||||
Hash: rand.RandBytes(tmhash.Size),
|
||||
Total: 1000,
|
||||
},
|
||||
}
|
||||
sig := make([]byte, ed25519.SignatureSize)
|
||||
|
||||
Reference in New Issue
Block a user