mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 10:41:41 +00:00
Add helper methods for nil checks in structs
This commit is contained in:
@ -55,6 +55,10 @@ func (p *PubKeyS) UnmarshalJSON(data []byte) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (p PubKeyS) Empty() bool {
|
||||
return p.PubKey == nil
|
||||
}
|
||||
|
||||
func PubKeyFromBytes(pubKeyBytes []byte) (pubKey PubKey, err error) {
|
||||
err = wire.ReadBinaryBytes(pubKeyBytes, &pubKey)
|
||||
return
|
||||
|
Reference in New Issue
Block a user