mirror of https://github.com/status-im/go-waku.git
fix: inefficient assigns
This commit is contained in:
parent
a9343b0e86
commit
4e5237df8d
|
@ -35,6 +35,10 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
prvKey, err := crypto.HexToECDSA(key)
|
prvKey, err := crypto.HexToECDSA(key)
|
||||||
|
if err != nil {
|
||||||
|
log.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
|
@ -85,6 +89,10 @@ func write(ctx context.Context, wakuNode *node.WakuNode, msgContent string) {
|
||||||
p.Key = &node.KeyInfo{Kind: node.None}
|
p.Key = &node.KeyInfo{Kind: node.None}
|
||||||
|
|
||||||
payload, err := p.Encode(version)
|
payload, err := p.Encode(version)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("Error encoding the payload: ", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
msg := &pb.WakuMessage{
|
msg := &pb.WakuMessage{
|
||||||
Payload: payload,
|
Payload: payload,
|
||||||
|
|
Loading…
Reference in New Issue