mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
sign bytes w struct literals
This commit is contained in:
committed by
Ethan Buchman
parent
ed42f70248
commit
da8b043612
@ -74,7 +74,15 @@ func (psh PartSetHeader) Equals(other PartSetHeader) bool {
|
||||
}
|
||||
|
||||
func (psh PartSetHeader) WriteSignBytes(w io.Writer, n *int, err *error) {
|
||||
wire.WriteTo([]byte(Fmt(`{"hash":"%X","total":%v}`, psh.Hash, psh.Total)), w, n, err)
|
||||
wire.WriteJSON(
|
||||
struct {
|
||||
Hash []byte `json:"hash"`
|
||||
Total int `json:"total"`
|
||||
}{
|
||||
psh.Hash,
|
||||
psh.Total,
|
||||
},
|
||||
w, n, err)
|
||||
}
|
||||
|
||||
//-------------------------------------
|
||||
|
Reference in New Issue
Block a user