Skip to content

Commit 2735802

Browse files
committed
pss/message: Flags.EncodeRLP cosmetic change
1 parent 4acb026 commit 2735802

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pss/message/flags.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ func (f *Flags) DecodeRLP(s *rlp.Stream) error {
3636

3737
// EncodeRLP implements the rlp.Encoder interface
3838
func (f *Flags) EncodeRLP(w io.Writer) error {
39-
flagsBytes := []byte{0}
39+
var flags byte
4040
if f.Raw {
41-
flagsBytes[0] |= flagRaw
41+
flags |= flagRaw
4242
}
4343
if f.Symmetric {
44-
flagsBytes[0] |= flagSymmetric
44+
flags |= flagSymmetric
4545
}
4646

47-
return rlp.Encode(w, flagsBytes)
47+
return rlp.Encode(w, []byte{flags})
4848
}

0 commit comments

Comments
 (0)