mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-25 18:51:39 +00:00
go fmt
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
package blocks
|
||||
|
||||
import (
|
||||
. "github.com/tendermint/tendermint/binary"
|
||||
"io"
|
||||
. "github.com/tendermint/tendermint/binary"
|
||||
"io"
|
||||
)
|
||||
|
||||
/*
|
||||
@ -11,22 +11,22 @@ Typically only the signature is passed around, as the hash & height are implied.
|
||||
*/
|
||||
|
||||
type Vote struct {
|
||||
Height UInt64
|
||||
BlockHash ByteSlice
|
||||
Signature
|
||||
Height UInt64
|
||||
BlockHash ByteSlice
|
||||
Signature
|
||||
}
|
||||
|
||||
func ReadVote(r io.Reader) Vote {
|
||||
return Vote{
|
||||
Height: ReadUInt64(r),
|
||||
BlockHash: ReadByteSlice(r),
|
||||
Signature: ReadSignature(r),
|
||||
}
|
||||
return Vote{
|
||||
Height: ReadUInt64(r),
|
||||
BlockHash: ReadByteSlice(r),
|
||||
Signature: ReadSignature(r),
|
||||
}
|
||||
}
|
||||
|
||||
func (self Vote) WriteTo(w io.Writer) (n int64, err error) {
|
||||
n, err = WriteOnto(self.Height, w, n, err)
|
||||
n, err = WriteOnto(self.BlockHash, w, n, err)
|
||||
n, err = WriteOnto(self.Signature, w, n, err)
|
||||
return
|
||||
n, err = WriteOnto(self.Height, w, n, err)
|
||||
n, err = WriteOnto(self.BlockHash, w, n, err)
|
||||
n, err = WriteOnto(self.Signature, w, n, err)
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user