github.com/annchain/OG@v0.0.9/plugin/annsensus/message.go (about) 1 package annsensus 2 3 import ( 4 "github.com/annchain/OG/consensus/annsensus" 5 "github.com/annchain/OG/message" 6 ) 7 8 //go:generate msgp 9 10 var MessageTypeAnnsensus message.GeneralMessageType = 2 11 12 //msgp:tuple GeneralMessageAnnsensus 13 type GeneralMessageAnnsensus struct { 14 InnerMessageType annsensus.AnnsensusMessageType 15 InnerMessage []byte 16 } 17 18 func (m *GeneralMessageAnnsensus) GetBytes() []byte { 19 b, err := m.MarshalMsg(nil) 20 if err != nil { 21 panic(err) 22 } 23 return b 24 } 25 26 func (m *GeneralMessageAnnsensus) GetType() message.GeneralMessageType { 27 return MessageTypeAnnsensus 28 } 29 30 func (m *GeneralMessageAnnsensus) String() string { 31 return "GeneralMessageAnnsensus" 32 }