Skip to content

Commit

Permalink
pss/message: Flags.EncodeRLP cosmetic change
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeletier committed Sep 10, 2019
1 parent 4acb026 commit 2735802
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pss/message/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ func (f *Flags) DecodeRLP(s *rlp.Stream) error {

// EncodeRLP implements the rlp.Encoder interface
func (f *Flags) EncodeRLP(w io.Writer) error {
flagsBytes := []byte{0}
var flags byte
if f.Raw {
flagsBytes[0] |= flagRaw
flags |= flagRaw
}
if f.Symmetric {
flagsBytes[0] |= flagSymmetric
flags |= flagSymmetric
}

return rlp.Encode(w, flagsBytes)
return rlp.Encode(w, []byte{flags})
}

0 comments on commit 2735802

Please sign in to comment.