mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-28 04:01:40 +00:00
Add helper methods for nil checks in structs
This commit is contained in:
@ -51,6 +51,10 @@ func (p *SignatureS) UnmarshalJSON(data []byte) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (p SignatureS) Empty() bool {
|
||||
return p.Signature == nil
|
||||
}
|
||||
|
||||
func SignatureFromBytes(sigBytes []byte) (sig Signature, err error) {
|
||||
err = wire.ReadBinaryBytes(sigBytes, &sig)
|
||||
return
|
||||
|
Reference in New Issue
Block a user