Skip to content

Commit 5f9b01a

Browse files
gballetkaralabe
authored andcommitted
whisper: only use the node id as a p2p id, not for sending messages (#16102)
This is in preparation for the switch to libp2p: the ID generated will be from a private key created with the help of libp2p's crypto library, while Whisper will still use Go's default crypto libraries for encrypting its messages. This change removes a conflict. It shouldn't have any impact as the person receiving emails is the user, not the node.
1 parent fac6d9c commit 5f9b01a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/wnode/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func initialize() {
265265
Config: p2p.Config{
266266
PrivateKey: nodeid,
267267
MaxPeers: maxPeers,
268-
Name: common.MakeName("wnode", "5.0"),
268+
Name: common.MakeName("wnode", "6.0"),
269269
Protocols: shh.Protocols(),
270270
ListenAddr: *argIP,
271271
NAT: nat.Any(),
@@ -656,7 +656,7 @@ func requestExpiredMessagesLoop() {
656656
params.PoW = *argServerPoW
657657
params.Payload = data
658658
params.KeySym = key
659-
params.Src = nodeid
659+
params.Src = asymKey
660660
params.WorkTime = 5
661661

662662
msg, err := whisper.NewSentMessage(&params)

0 commit comments

Comments
 (0)