mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-06 10:01:19 +00:00
types: fix validator_set_test issue with UnmarshalBinary into ptr
This commit is contained in:
parent
ca3655a409
commit
abeeeeb611
@ -16,7 +16,7 @@ import (
|
|||||||
func randPubKey() crypto.PubKey {
|
func randPubKey() crypto.PubKey {
|
||||||
var pubKey [32]byte
|
var pubKey [32]byte
|
||||||
copy(pubKey[:], cmn.RandBytes(32))
|
copy(pubKey[:], cmn.RandBytes(32))
|
||||||
return crypto.PubKeyEd25519(pubKey)
|
return crypto.PubKeyEd25519(pubKey).Wrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
func randValidator_() *Validator {
|
func randValidator_() *Validator {
|
||||||
@ -299,7 +299,7 @@ func (valSet *ValidatorSet) toBytes() []byte {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (valSet *ValidatorSet) fromBytes(b []byte) {
|
func (valSet *ValidatorSet) fromBytes(b []byte) {
|
||||||
err := wire.UnmarshalBinary(b, valSet)
|
err := wire.UnmarshalBinary(b, &valSet)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED
|
// DATA HAS BEEN CORRUPTED OR THE SPEC HAS CHANGED
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user