mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-12 21:10:36 +00:00
22 lines
547 B
Go
22 lines
547 B
Go
package consensus
|
|
|
|
import "github.com/CityOfZion/neo-go/pkg/io"
|
|
|
|
// commit represents dBFT Commit message.
|
|
type commit struct {
|
|
Signature [signatureSize]byte
|
|
}
|
|
|
|
// signatureSize is an rfc6989 signature size in bytes
|
|
// without leading byte (0x04, uncompressed)
|
|
const signatureSize = 64
|
|
|
|
// EncodeBinary implements io.Serializable interface.
|
|
func (c *commit) EncodeBinary(w *io.BinWriter) {
|
|
w.WriteBE(c.Signature)
|
|
}
|
|
|
|
// DecodeBinary implements io.Serializable interface.
|
|
func (c *commit) DecodeBinary(r *io.BinReader) {
|
|
r.ReadBE(&c.Signature)
|
|
}
|