mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-07 15:23:08 +00:00
more idiomatic message copying for signature purposes
This commit is contained in:
parent
3788f504a5
commit
b353ddca06
9
sign.go
9
sign.go
@ -17,12 +17,9 @@ func verifyMessageSignature(m *pb.Message) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
xm := pb.Message{
|
xm := *m
|
||||||
Data: m.Data,
|
xm.Signature = nil
|
||||||
TopicIDs: m.TopicIDs,
|
xm.Key = nil
|
||||||
From: m.From,
|
|
||||||
Seqno: m.Seqno,
|
|
||||||
}
|
|
||||||
bytes, err := xm.Marshal()
|
bytes, err := xm.Marshal()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user