Skip to content

Commit

Permalink
more idiomatic message copying for signature purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Sep 5, 2018
1 parent 8429e7d commit 8de4c59
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ func verifyMessageSignature(m *pb.Message) error {
return err
}

xm := pb.Message{
Data: m.Data,
TopicIDs: m.TopicIDs,
From: m.From,
Seqno: m.Seqno,
}
xm := *m
xm.Signature = nil
xm.Key = nil
bytes, err := xm.Marshal()
if err != nil {
return err
Expand Down

0 comments on commit 8de4c59

Please sign in to comment.