parent
8ad355b444
commit
5c2f69bd2c
2 changed files with 2 additions and 1 deletions
|
@ -167,6 +167,7 @@ var (
|
|||
func NewPayload(m netmode.Magic) *Payload {
|
||||
return &Payload{
|
||||
network: m,
|
||||
message: new(message),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ func (p *Payload) EncodeBinaryUnsigned(w *io.BinWriter) {
|
|||
w.WriteU32LE(p.height)
|
||||
w.WriteU16LE(p.validatorIndex)
|
||||
|
||||
if p.message != nil {
|
||||
if p.data == nil {
|
||||
ww := io.NewBufBinWriter()
|
||||
p.message.EncodeBinary(ww.BinWriter)
|
||||
p.data = ww.Bytes()
|
||||
|
|
Loading…
Reference in a new issue